Re: Pass ParseState as down to utility functions.
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: jian he <jian.universality@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Kirill Reshke <reshkekirill@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-25T09:28:52Z
Lists: pgsql-hackers
On Mon, Dec 16, 2024 at 05:25:45PM +0800, jian he wrote: > i've split into 3 patches, feel free to merge them in any way. > v12-0001: add error position for ATPrepAlterColumnType. For this one, why don't you do the same for undefined columns and USING with generated columns at least? This looks half-baked. > v12-0002: add error position for these 3 functions: > transformColumnDefinition, transformAlterTableStmt, transformTableConstraint. ERROR: column "c" of relation "itest4" does not exist +LINE 1: ALTER TABLE itest4 ALTER COLUMN c ADD GENERATED ALWAYS AS ID... + ^ This one is kind of confusing? The part that matters for the error is the column that does not exist, not the ADD GENERATED. ERROR: conflicting NO INHERIT declarations for not-null constraints on column "a" +LINE 1: ..._tbl_fail (a int generated by default as identity not null n... + ^ This one also, is kind of hard-ish to act on.. > v12-0003: add error position for these 2 functions: > DefineType, transformOfType This one has been applied as of 0f23dedc9176. -- Michael
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