]> granicus.if.org Git - postgresql/commit
Fix old pg_dump oversight: default values for domains really need to be dumped
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 21 Feb 2006 18:01:32 +0000 (18:01 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 21 Feb 2006 18:01:32 +0000 (18:01 +0000)
commit3666260ffd455ac1847ef04cc39b5b00ef760961
tree4e76a48083c9ccf0370de6997114624ead9d2505
parentaf49a1634f6e2b47c99580317a6af8365839946a
Fix old pg_dump oversight: default values for domains really need to be dumped
by decompiling the typdefaultbin expression, not just printing the typdefault
text which may be out-of-date or assume the wrong schema search path.  (It's
the same hazard as for adbin vs adsrc in column defaults.)  The catalogs.sgml
spec for pg_type implies that the correct procedure is to look to
typdefaultbin first and consider typdefault only if typdefaultbin is NULL.
I made dumping of both domains and base types do that, even though in the
current backend code typdefaultbin is always correct for domains and
typdefault for base types --- might as well try to future-proof it a little.
Per bug report from Alexander Galler.
src/bin/pg_dump/pg_dump.c