Skip to content

Conversation

@guan404ming
Copy link
Member

Why

PostgreSQL allows promoting an existing unique index to a PRIMARY KEY or UNIQUE table constraint via ALTER TABLE, which was
not supported by the parser.

How

  • Add ConstraintUsingIndex variant to TableConstraint with display, span, and serialization support
  • Parse USING INDEX index_name after PRIMARY KEY or UNIQUE keywords in constraint parsing
  • Add tests for named/unnamed constraints and deferrable characteristics

Signed-off-by: Guan-Ming Chiu <guanmingchiu@gmail.com>
@guan404ming guan404ming marked this pull request as ready for review February 9, 2026 09:54
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