pgtap
pgtap copied to clipboard
create table_constraint_checksum function for pg_tapgen
Another request for comments, still linked with theory/tap-parser-sourcehandler-pgtap#18
This would make checking all constraints much simpler in pg_tapgen I think… pg_tapgen could generate all check for constraints in a database in one go, calling only this function systematically.
If you agree, please tell me how to proceed next… should there be all combinations of this function's parameters available ? (with and without schema, with and without description… there could be a great amount of possible combinations).
The thing I don't totally feel comfortable with this is if pg_get_constraintdef changes between releases. But consrc could change also anyway...
If you're thinking you might want to write a slew of these functions, you might want to consider making your own extension that depends on pgTAP and release it on PGXN.
I just would like to add the minimum to be able to extend pg_tapgen to test more things. Shouldn't this be in pg_tab, then ?
Sure, that make sense. Do please add tests, however.
Yes, I will, of course. And doc I presume. I just wanted to know if what I started made sense...
Looks okay to me, though I agree that it could get annoying if the output of pg_get_constraintdef
changes between releases.
Yes. It could be the same problem using consrc/confkey anyway… I don't see a smarter way out of this.
Agreed, but maybe check with pgsql-hackers.
Just added the doc. No response from -hackers yet.
Still nothing on hackers :)
So I guess no one has a much better idea
Please merge current master as well; it has much improved automated testing.