pgsql: Fix pg_dump to dump casts between auto-generated types.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix pg_dump to dump casts between auto-generated types.
Date: 2011-10-18 21:11:38
Message-ID: E1RGGwk-0004Zo-IL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix pg_dump to dump casts between auto-generated types.

The heuristic for when to dump a cast failed for a cast between table
rowtypes, as reported by Frédéric Rejol. Fix it by setting
the "dump" flag for such a type the same way as the flag is set for the
underlying table or base type. This won't result in the auto-generated
type appearing in the output, since setting its objType to DO_DUMMY_TYPE
unconditionally suppresses that. But it will result in dumpCast doing what
was intended.

Back-patch to 8.3. The 8.2 code is rather different in this area, and it
doesn't seem worth any risk to fix a corner case that nobody has stumbled
on before.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/015cda44cfc5e02ec7147ab55560bd14c74acf08

Modified Files
--------------
src/bin/pg_dump/common.c | 2 +-
src/bin/pg_dump/pg_dump.c | 26 ++++++++++++++++++++------
2 files changed, 21 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-10-18 21:39:57 pgsql: Remove unnecessary AssertMacro() to suppress gcc 4.6 compiler wa
Previous Message Magnus Hagander 2011-10-18 13:59:12 pgsql: Exclude postmaster.opts from base backups