Clean up handling of COLLATE clauses in index column definitions.
Tom Lane <tgl@sss.pgh.pa.us>
Clean up handling of COLLATE clauses in index column definitions. Ensure that COLLATE at the top level of an index expression is treated the same as a grammatically separate COLLATE. Fix bogus reverse-parsing logic in pg_get_indexdef.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/indexcmds.c | modified | +49 −36 |
| src/backend/utils/adt/ruleutils.c | modified | +12 −7 |
| src/test/regress/expected/collate.linux.utf8.out | modified | +10 −8 |
| src/test/regress/expected/collate.out | modified | +13 −11 |
| src/test/regress/sql/collate.linux.utf8.sql | modified | +4 −3 |
| src/test/regress/sql/collate.sql | modified | +6 −5 |