Fix handling of collation in SQL-language functions.
Tom Lane <tgl@sss.pgh.pa.us>
Fix handling of collation in SQL-language functions. Ensure that parameter symbols receive collation from the function's resolved input collation, and fix inlining to behave properly. BTW, this commit lays about 90% of the infrastructure needed to support use of argument names in SQL functions. Parsing of parameters is now done via the parser-hook infrastructure ... we'd just need to supply a column-ref hook ...
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/pg_proc.c | modified | +9 −4 |
| src/backend/executor/functions.c | modified | +135 −39 |
| src/backend/optimizer/util/clauses.c | modified | +73 −33 |
| src/backend/parser/parse_param.c | modified | +5 −0 |
| src/include/executor/functions.h | modified | +9 −0 |
| src/test/regress/expected/collate.linux.utf8.out | modified | +53 −0 |
| src/test/regress/sql/collate.linux.utf8.sql | modified | +19 −0 |