Add a parse location field to struct FunctionParameter.
Tom Lane <tgl@sss.pgh.pa.us>
Add a parse location field to struct FunctionParameter. This allows an error cursor to be supplied for a bunch of bad-function-definition errors that previously lacked one, or that cheated a bit by pointing at the contained type name when the error isn't really about that. Bump catversion from an abundance of caution --- I don't think this node type can actually appear in stored views/rules, but better safe than sorry. Jian He and Tom Lane (extracted from a larger patch by Jian, with some additional work by me) Discussion: https://postgr.es/m/CACJufxEmONE3P2En=jopZy1m=cCCUs65M4+1o52MW5og9oaUPA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/functioncmds.c | modified | +31 −16 |
| src/backend/nodes/nodeFuncs.c | modified | +1 −2 |
| src/backend/parser/gram.y | modified | +12 −5 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/nodes/parsenodes.h | modified | +1 −0 |
| src/test/modules/test_ddl_deparse/expected/create_type.out | modified | +2 −0 |
| src/test/modules/test_ddl_deparse/expected/opfamily.out | modified | +4 −0 |
| src/test/modules/test_pg_dump/expected/test_pg_dump.out | modified | +2 −0 |
| src/test/regress/expected/create_cast.out | modified | +2 −0 |
| src/test/regress/expected/create_procedure.out | modified | +4 −0 |
| src/test/regress/expected/create_type.out | modified | +14 −0 |
| src/test/regress/expected/equivclass.out | modified | +4 −0 |
| src/test/regress/expected/expressions.out | modified | +4 −0 |
| src/test/regress/expected/float4-misrounded-input.out | modified | +2 −0 |
| src/test/regress/expected/float4.out | modified | +2 −0 |
| src/test/regress/expected/float8.out | modified | +2 −0 |
| src/test/regress/expected/polymorphism.out | modified | +12 −0 |
Discussion
- make all ereport in gram.y print out relative location 5 messages · 2024-10-26 → 2024-10-31