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

sql: support ADD CONSTRAINT ... NOT VALID #33551

Closed
thoszhang opened this issue Jan 7, 2019 · 2 comments
Closed

sql: support ADD CONSTRAINT ... NOT VALID #33551

thoszhang opened this issue Jan 7, 2019 · 2 comments
Assignees
Labels
A-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@thoszhang
Copy link
Contributor

Currently, when a constraint is added, the constraint is not validated for existing rows (see #33550). Postgres's behavior (https://www.postgresql.org/docs/11/sql-altertable.html) is to validate newly added constraints for existing rows by default, unless NOT VALID is specified.

We should first address #33550 to bring ADD CONSTRAINT in line with the default behavior of Postgres, and then add NOT VALID as an option.

@awoods187 awoods187 added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Mar 6, 2019
@thoszhang
Copy link
Contributor Author

This is done for check constraints, in #38382

@tyler314
Copy link

The FK constraint issue is covered by #38663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

3 participants