diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-10-18 17:11:07 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-10-18 17:11:07 -0400 |
| commit | 015cda44cfc5e02ec7147ab55560bd14c74acf08 (patch) | |
| tree | 67fdcd6bba6f8cf12f6c51567fba1269800ab85e /src/bin/pg_dump/common.c | |
| parent | 9ca46f5bb67de41f524315e414ea57fdbd614111 (diff) | |
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.
Diffstat (limited to 'src/bin/pg_dump/common.c')
| -rw-r--r-- | src/bin/pg_dump/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index 9a5c6b9360a..bf06f678e20 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -131,7 +131,7 @@ getSchemaData(int *numTablesPtr) funinfo = getFuncs(&numFuncs); funinfoindex = buildIndexArray(funinfo, numFuncs, sizeof(FuncInfo)); - /* this must be after getFuncs */ + /* this must be after getTables and getFuncs */ if (g_verbose) write_msg(NULL, "reading user-defined types\n"); typinfo = getTypes(&numTypes); |
