brianc / node-sql

SQL generation for node.js
MIT License
1.05k stars 191 forks source link

tab.indexes().create(indName).using('btree').on(col) fails with using() for Postgres 9.5 #354

Open 3n-mb opened 7 years ago

3n-mb commented 7 years ago

Postgres docs for creating index say, removing other things:

CREATE INDEX [ name ] ON table_name [ USING method ]
    ( { column_name } , ... )

i.e. clause USING should be between table name and column names.

But example from tests shows that clause is not placed between table name and column names.

When query, like in a test is given to Postgres, error is thrown: error: syntax error at or near "USING" with code: '42601'