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

calling validate in a transaction with not valid should be an error #250

Open
chdsbd opened this issue Aug 24, 2022 · 0 comments
Open

calling validate in a transaction with not valid should be an error #250

chdsbd opened this issue Aug 24, 2022 · 0 comments

Comments

@chdsbd
Copy link
Collaborator

chdsbd commented Aug 24, 2022

Calling validate constraint in a transaction defeats the purpose of using not valid

begin;
ALTER TABLE "email" ADD CONSTRAINT "fk_user"
    FOREIGN KEY ("user_id") REFERENCES "user" ("id") NOT VALID;
ALTER TABLE "email" VALIDATE CONSTRAINT "fk_user";
commit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant