Greg Stark wrote:
I want all my foreign key constraints to be deferrable. They were all created
with the default (not deferrable).

Is it enough to just do

update pg_constraint set condeferrable = 't' where contype = 'f';

No - the constraints are actually enforced by triggers - Just just normally don't see those triggers - but if you look into pg_triggers,
you'll find them. The have "tgisconstraint" set to true, so it should
be easy to find them.

Try an additional "update pg_trigger set isdeferrable=true where pgisconstraint = true", and it should work..

I'm not etirely sure about the fieldnames - so better check them - e.g
"\d pg_catalog.pg_trigger" could help, when typed into psql ;-)

mfg, Florian Pflug


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to