Re: Pass ParseState as down to utility functions.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jian he <jian.universality@gmail.com>
Cc: Kirill Reshke <reshkekirill@gmail.com>,
Michael Paquier <michael@paquier.xyz>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-11T20:48:57Z
Lists: pgsql-hackers
jian he <jian.universality@gmail.com> writes: > add parser_errposition to some places in > transformTableConstraint, transformColumnDefinition > where v8 didn't. I'm not loving the idea of cons'ing up ParseStates in random places in tablecmds.c. I think we ought to fix things so that the one made in standard_ProcessUtility is passed down to all these places, replacing ad-hoc queryString and queryEnv parameters. Eventually we might want to make ProcessUtility's callers pass down a pstate, but that would be a whole other area of invasive changes, so I think we should leave that idea for later. Right now though, it seems reasonable to change AlterTableUtilityContext to replace the queryString and queryEnv fields with a ParseState carrying that info --- and, perhaps, someday saving us from adding more ad-hoc fields there. regards, tom lane
Commits
-
Print out error position for some ALTER TABLE ALTER COLUMN type
- 65281391a937 18.0 landed
-
Print out error position for some more DDLs
- 0f23dedc9176 18.0 landed
-
Print out error position for CREATE DOMAIN
- 39240bcad56d 18.0 landed
-
Add some regression tests for missing DDL patterns
- 0172b4c9449e 18.0 landed
-
Re-implement the ereport() macro using __VA_ARGS__.
- e3a87b4991cc 13.0 cited