Skip to content

Fix PostgreSQL column DEFAULT expression analysis#140

Merged
rebelice merged 1 commit into
mainfrom
codex/pg-default-expr-kind
May 14, 2026
Merged

Fix PostgreSQL column DEFAULT expression analysis#140
rebelice merged 1 commit into
mainfrom
codex/pg-default-expr-kind

Conversation

@rebelice
Copy link
Copy Markdown
Collaborator

Summary

  • Analyze column DEFAULT expressions with PostgreSQL column-default semantics instead of standalone expression semantics.
  • Return DEFAULT analysis and coercion errors for CREATE TABLE and ALTER TABLE paths, with rollback for failed ADD COLUMN/default analysis.
  • Match PostgreSQL error precedence and SQLSTATEs for column references, subqueries, aggregates, grouping, window/SRF defaults, and identity/generated default changes.

Test Plan

  • go test ./pg/catalog -count=1
  • git diff --check

@rebelice rebelice merged commit 97e2637 into main May 14, 2026
2 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.

1 participant