pgsql: Fix old pg_dump oversight: default values for domains really need

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix old pg_dump oversight: default values for domains really need
Date: 2006-02-21 18:01:32
Message-ID: 20060221180132.B55BD9DCA1C@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/bin/pg_dump:
pg_dump.c (r1.429 -> r1.430)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c.diff?r1=1.429&r2=1.430)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-02-21 18:01:43 pgsql: Fix old pg_dump oversight: default values for domains really need
Previous Message Tom Lane 2006-02-21 06:07:10 pgsql: Adjust probe for getaddrinfo to cope with macro-ized definitions,