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

Check if a constraint is validated or not #129

Open
rodo opened this issue Nov 24, 2016 · 9 comments
Open

Check if a constraint is validated or not #129

rodo opened this issue Nov 24, 2016 · 9 comments
Assignees

Comments

@rodo
Copy link
Contributor

rodo commented Nov 24, 2016

Actually there is no function to check if a constraint is validate or not.

@theory
Copy link
Owner

theory commented Nov 24, 2016

I don't understand what you're asking for here. There are assertions for check constraints. But to make sure they actually do what they say, I tend to write tests that do the DML to exercise them.

@rodo
Copy link
Contributor Author

rodo commented Nov 24, 2016

When create some constraint we set them as NOT VALID and after we validate them with ALTER TABLE ... VALIDATE CONSTRAINT
So we need a test to check if the constraint was validate or not.

Hope to be more explicit :)

@theory
Copy link
Owner

theory commented Nov 24, 2016

Ah, yeah, that makes sense.

@rodo
Copy link
Contributor Author

rodo commented Nov 24, 2016

I'll prepare a PR for this, have you already plan a date for the 0.97 ?

@theory
Copy link
Owner

theory commented Nov 24, 2016

Yeah, I meant to do it a few days ago. Will likely do it this weekend.

@rodo
Copy link
Contributor Author

rodo commented Nov 25, 2016

Perfect, so I'll do my PR to be included in a 0.98 or later.

@rodo
Copy link
Contributor Author

rodo commented Jan 17, 2017

Constraint validation is available since PG 9.1, @theory do we still need to support older version or not ?

@theory
Copy link
Owner

theory commented Jan 17, 2017

I think we were going to drop support for 8.x and keep 9.0, but maybe it was 9.1? @decibel?

@decibel
Copy link
Collaborator

decibel commented Jan 17, 2017 via email

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

3 participants