Fix dumping of DEFERRABLE/INITIALLY DEFERRED:
authorBruce Momjian <bruce@momjian.us>
Wed, 8 Jan 2003 22:54:36 +0000 (22:54 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 8 Jan 2003 22:54:36 +0000 (22:54 +0000)
commitfdb1c80747705bbb98027ff5f64bd5a89ee40874
tree0cd94c358594f1f35e0ae1cc461ac6dad6913ffa
parenta899179c8cdbd74c4a3a1b9e2712b92321182f0d
Fix dumping of DEFERRABLE/INITIALLY DEFERRED:

> The big problem is that while pg_dump's dump_trigger() looks at
> tginitdeferred and dumps accordingly, pg_get_constraintdef doesn't look
> at tginitdeferred, and therefore doesn't record the requirement as part
> of ALTER TABLE ADD CONSTRAINT.

pg_get_constraintdef should probably be looking at condeferrable and
condeferred in the pg_constraint row it's looking at.  Maybe something
like the attached.

(Added, output only non-default values.)

Stephan Szabo
src/backend/utils/adt/ruleutils.c