|
@@ 769-771 (lines=3) @@
|
| 766 |
|
$spec = "create index \"$tableCol\" ON \"$tableName\" USING $clusterMethod(\"ts_" . $indexName . "\") $fillfactor $where"; |
| 767 |
|
break; |
| 768 |
|
|
| 769 |
|
case 'unique': |
| 770 |
|
$spec = "create unique index \"$tableCol\" ON \"$tableName\" (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
| 771 |
|
break; |
| 772 |
|
|
| 773 |
|
case 'btree': |
| 774 |
|
$spec = "create index \"$tableCol\" ON \"$tableName\" USING btree (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
|
@@ 773-775 (lines=3) @@
|
| 770 |
|
$spec = "create unique index \"$tableCol\" ON \"$tableName\" (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
| 771 |
|
break; |
| 772 |
|
|
| 773 |
|
case 'btree': |
| 774 |
|
$spec = "create index \"$tableCol\" ON \"$tableName\" USING btree (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
| 775 |
|
break; |
| 776 |
|
|
| 777 |
|
case 'hash': |
| 778 |
|
//NOTE: this is not a recommended index type |
|
@@ 777-780 (lines=4) @@
|
| 774 |
|
$spec = "create index \"$tableCol\" ON \"$tableName\" USING btree (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
| 775 |
|
break; |
| 776 |
|
|
| 777 |
|
case 'hash': |
| 778 |
|
//NOTE: this is not a recommended index type |
| 779 |
|
$spec = "create index \"$tableCol\" ON \"$tableName\" USING hash (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
| 780 |
|
break; |
| 781 |
|
|
| 782 |
|
case 'index': |
| 783 |
|
//'index' is the same as default, just a normal index with the default type decided by the database. |
|
@@ 784-785 (lines=2) @@
|
| 781 |
|
|
| 782 |
|
case 'index': |
| 783 |
|
//'index' is the same as default, just a normal index with the default type decided by the database. |
| 784 |
|
default: |
| 785 |
|
$spec = "create index \"$tableCol\" ON \"$tableName\" (" . $this->implodeColumnList($indexSpec['columns']) . ") $fillfactor $where"; |
| 786 |
|
} |
| 787 |
|
return trim($spec) . ';'; |
| 788 |
|
} |