How can I set all constraints to be deferrable for a DB/schema

Started by David Gauthierabout 6 years ago2 messagesgeneral
Jump to latest
#1David Gauthier
davegauthierpg@gmail.com

Hi:

psql (9.6.7, server 11.3) (linux)

Is there a way to set all constraints on all tables of a DB and/or schema
to be deferrable ? Or do I have to do them one-by-one ?

#2Guillaume Lelarge
guillaume@lelarge.info
In reply to: David Gauthier (#1)
Re: How can I set all constraints to be deferrable for a DB/schema

Hi,

Le mer. 18 mars 2020 à 04:14, David Gauthier <davegauthierpg@gmail.com> a
écrit :

Hi:

psql (9.6.7, server 11.3) (linux)

Is there a way to set all constraints on all tables of a DB and/or schema
to be deferrable ? Or do I have to do them one-by-one ?

You have to do them one by one. Or write a DO script to do it (but it will
still involve many ALTER TABLE statements).

--
Guillaume.