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

DROP SEQUENCE does not check domain constraints #2433

Open
katzyn opened this issue Feb 6, 2020 · 0 comments
Open

DROP SEQUENCE does not check domain constraints #2433

katzyn opened this issue Feb 6, 2020 · 0 comments

Comments

@katzyn
Copy link
Contributor

katzyn commented Feb 6, 2020

CREATE SEQUENCE SEQ;
CREATE DOMAIN D INT CHECK (VALUE < NEXT VALUE FOR SEQ);
DROP SEQUENCE SEQ;
SCRIPT;
> CREATE USER …
> CREATE DOMAIN "PUBLIC"."D" AS INT;
> ALTER DOMAIN "PUBLIC"."D" ADD CONSTRAINT "PUBLIC"."CONSTRAINT_4"
>     CHECK(VALUE < NEXT VALUE FOR "PUBLIC"."") NOCHECK;

I don't think that sequences should be allowed in table check and domain constraints, but I don't see such restriction in the Standard, maybe I'm missing it somehow.

Anyway, if we support them, they should be considered as dependencies.

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

No branches or pull requests

1 participant