pgtap
pgtap copied to clipboard
Check if a constraint is validated or not
Actually there is no function to check if a constraint is validate or not.
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.
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 :)
Ah, yeah, that makes sense.
I'll prepare a PR for this, have you already plan a date for the 0.97 ?
Yeah, I meant to do it a few days ago. Will likely do it this weekend.
Perfect, so I'll do my PR to be included in a 0.98 or later.
Constraint validation is available since PG 9.1, @theory do we still need to support older version or not ?
I think we were going to drop support for 8.x and keep 9.0, but maybe it was 9.1? @decibel?
We need to dump any versions that don't support extensions, so anything older than 9.1.