File tree Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ CREATE UNIQUE INDEX uniq_service_when_not_null
1010 ON schema2 .table3 (uid, svc)
1111 WHERE svc IS NOT NULL ;
1212
13- CREATE UNIQUE INDEX new_unique_idx ON new_example(a, b) INCLUDE (c);
13+ CREATE UNIQUE INDEX new_unique_idx ON new_example(a, b) INCLUDE (c);
14+
15+ CREATE INDEX CONCURRENTLY idx_with_operator ON boom .merkle_tree USING GIN ( name gin_trgm_ops ( param1 = 32 , param2 = true) );
Original file line number Diff line number Diff line change @@ -26287,6 +26287,73 @@ exports[`kitchen sink indexes 9`] = `
2628726287
2628826288exports[`kitchen sink indexes 10`] = `"CREATE UNIQUE INDEX new_unique_idx ON new_example ( a, b ) INCLUDE ( c );"`;
2628926289
26290+ exports[`kitchen sink indexes 11`] = `
26291+ {
26292+ "RawStmt": {
26293+ "stmt": {
26294+ "IndexStmt": {
26295+ "accessMethod": "gin",
26296+ "concurrent": true,
26297+ "idxname": "idx_with_operator",
26298+ "indexParams": [
26299+ {
26300+ "IndexElem": {
26301+ "name": "name",
26302+ "nulls_ordering": "SORTBY_NULLS_DEFAULT",
26303+ "opclass": [
26304+ {
26305+ "String": {
26306+ "str": "gin_trgm_ops",
26307+ },
26308+ },
26309+ ],
26310+ "opclassopts": [
26311+ {
26312+ "DefElem": {
26313+ "arg": {
26314+ "Integer": {
26315+ "ival": 32,
26316+ },
26317+ },
26318+ "defaction": "DEFELEM_UNSPEC",
26319+ "defname": "param1",
26320+ "location": 624,
26321+ },
26322+ },
26323+ {
26324+ "DefElem": {
26325+ "arg": {
26326+ "String": {
26327+ "str": "true",
26328+ },
26329+ },
26330+ "defaction": "DEFELEM_UNSPEC",
26331+ "defname": "param2",
26332+ "location": 637,
26333+ },
26334+ },
26335+ ],
26336+ "ordering": "SORTBY_DEFAULT",
26337+ },
26338+ },
26339+ ],
26340+ "relation": {
26341+ "inh": true,
26342+ "location": 575,
26343+ "relname": "merkle_tree",
26344+ "relpersistence": "p",
26345+ "schemaname": "boom",
26346+ },
26347+ },
26348+ },
26349+ "stmt_len": 127,
26350+ "stmt_location": 526,
26351+ },
26352+ }
26353+ `;
26354+
26355+ exports[`kitchen sink indexes 12`] = `"CREATE INDEX CONCURRENTLY idx_with_operator ON boom.merkle_tree USING GIN ( name gin_trgm_ops ( param1 = 32, param2 = true ) );"`;
26356+
2629026357exports[`kitchen sink insert 1`] = `
2629126358{
2629226359 "RawStmt": {
Original file line number Diff line number Diff line change @@ -1551,6 +1551,14 @@ export default class Deparser {
15511551 const output = [ ] ;
15521552 if ( node . name ) {
15531553 output . push ( node . name ) ;
1554+ if ( node . opclass && node . opclass . length ) {
1555+ output . push ( this . deparse ( node . opclass [ 0 ] ) ) ;
1556+ }
1557+ if ( node . opclassopts && node . opclassopts . length ) {
1558+ output . push ( '(' ) ;
1559+ output . push ( node . opclassopts . map ( ( opclassopt ) => this . deparse ( opclassopt ) ) . join ( ', ' ) ) ;
1560+ output . push ( ')' ) ;
1561+ }
15541562 if ( node . ordering === 'SORTBY_DESC' ) {
15551563 output . push ( 'DESC' ) ;
15561564 } else if ( node . ordering === 'SORTBY_ASC' ) {
You can’t perform that action at this time.
0 commit comments