Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for identity columns #398

Merged
merged 1 commit into from
Dec 31, 2024
Merged

Conversation

telser
Copy link
Contributor

@telser telser commented Dec 29, 2024

  • Expr support for column identity is added for columns that should be generated always or only by default

    • There is some oddity here. The specification for creating an identity column is to add a constraint. However when looking up in the catalog identity information is not held with other constraints.
  • Field definitions can be marked as identity

  • Support for identity at the field definition limits to non-nullable fields, as is the case in PostgreSQL.

  • AutoMigration support for marking column identity

There is additional work needed for full support. This is left for the future. Particularly, identity columns can take options for the underlying sequence. However, supporting that will require being able to look up said sequence using a catalog table not currently supported: pg_depend.

Copy link
Member

@jlavelle jlavelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great overall! I have a concern about the i_fieldColumnConstraints field.

- Expr support for column identity is added for columns that should be
generated always or only by default

  - There is some oddity here. The specification for creating an
identity column is to add a constraint. However when looking up in the
catalog identity information is not held with other constraints.

- Field definitions can be marked as identity

- Support for identity at the field definition limits to non-nullable
fields, as is the case in PostgreSQL.

- AutoMigration support for marking column identity

There is additional work needed for full support. This is left for the
future. Particularly, identity columns can take options for the
underlying sequence. However, supporting that will require being able
to look up said sequence using a catalog table not currently
supported: pg_depend.
@telser telser force-pushed the telser/identity-columns branch from 920d774 to 9c37a4e Compare December 31, 2024 17:18
@telser telser merged commit 9c37a4e into main Dec 31, 2024
20 checks passed
@telser telser deleted the telser/identity-columns branch December 31, 2024 17:27
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.

2 participants