Skip to content

Deparser: Fix handling of constraint key named "value" in ALTER TABLE#329

Merged
lfittl merged 1 commit into17-latestfrom
17-fix-constraint-value
Feb 7, 2026
Merged

Deparser: Fix handling of constraint key named "value" in ALTER TABLE#329
lfittl merged 1 commit into17-latestfrom
17-fix-constraint-value

Conversation

@lfittl
Copy link
Member

@lfittl lfittl commented Feb 7, 2026

This was being ignored in all cases, but it should only be ignored if the Constraint object is originating in an ALTER DOMAIN statement.

Fixes pganalyze/pg_query_go#148

Note on AI tool use: Claude Code was used to write out the code once the issue was identified. I've manually verified that the Postgres "gram.y" only adds this dummy constraint key for ALTER DOMAIN (interestingly, not for CREATE DOMAIN).

This was being ignored in all cases, but it should only be ignored
if the Constraint object is originating in an ALTER DOMAIN statement.

pganalyze/pg_query_go#148
@lfittl lfittl merged commit 815abf7 into 17-latest Feb 7, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deparse of ALTER TABLE with constraint referencing a column named "value" leads to syntax error

2 participants

Comments