Commit 18661f28 authored by Tom Lane's avatar Tom Lane

Revert badly-broken patch to dump comments on composite-type columns.

parent d6e05afc
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* by PostgreSQL * by PostgreSQL
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.383 2004/08/04 21:34:11 tgl Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.384 2004/08/06 18:18:42 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2393,10 +2393,10 @@ getTables(int *numTables) ...@@ -2393,10 +2393,10 @@ getTables(int *numTables)
"d.classid = c.tableoid and d.objid = c.oid and " "d.classid = c.tableoid and d.objid = c.oid and "
"d.objsubid = 0 and " "d.objsubid = 0 and "
"d.refclassid = c.tableoid and d.deptype = 'i') " "d.refclassid = c.tableoid and d.deptype = 'i') "
"where relkind in ('%c', '%c', '%c', '%c') " "where relkind in ('%c', '%c', '%c') "
"order by c.oid", "order by c.oid",
RELKIND_SEQUENCE, RELKIND_SEQUENCE,
RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW, RELKIND_COMPOSITE_TYPE); RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW);
} }
else if (g_fout->remoteVersion >= 70300) else if (g_fout->remoteVersion >= 70300)
{ {
...@@ -2419,10 +2419,10 @@ getTables(int *numTables) ...@@ -2419,10 +2419,10 @@ getTables(int *numTables)
"d.classid = c.tableoid and d.objid = c.oid and " "d.classid = c.tableoid and d.objid = c.oid and "
"d.objsubid = 0 and " "d.objsubid = 0 and "
"d.refclassid = c.tableoid and d.deptype = 'i') " "d.refclassid = c.tableoid and d.deptype = 'i') "
"where relkind in ('%c', '%c', '%c', '%c') " "where relkind in ('%c', '%c', '%c') "
"order by c.oid", "order by c.oid",
RELKIND_SEQUENCE, RELKIND_SEQUENCE,
RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW, RELKIND_COMPOSITE_TYPE); RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW);
} }
else if (g_fout->remoteVersion >= 70200) else if (g_fout->remoteVersion >= 70200)
{ {
...@@ -4063,7 +4063,7 @@ dumpComment(Archive *fout, const char *target, ...@@ -4063,7 +4063,7 @@ dumpComment(Archive *fout, const char *target,
/* /*
* dumpTableComment -- * dumpTableComment --
* *
* As above, but dump comments for both the specified table, view or composite type * As above, but dump comments for both the specified table (or view)
* and its columns. * and its columns.
*/ */
static void static void
...@@ -4864,7 +4864,6 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo) ...@@ -4864,7 +4864,6 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
int i_attname; int i_attname;
int i_atttypdefn; int i_atttypdefn;
int i; int i;
TableInfo *tableInfo;
/* Set proper schema search path so type references list correctly */ /* Set proper schema search path so type references list correctly */
selectSourceSchema(tinfo->dobj.namespace->dobj.name); selectSourceSchema(tinfo->dobj.namespace->dobj.name);
...@@ -4929,6 +4928,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo) ...@@ -4929,6 +4928,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
tinfo->dobj.dependencies, tinfo->dobj.nDeps, tinfo->dobj.dependencies, tinfo->dobj.nDeps,
NULL, NULL); NULL, NULL);
/* Dump Type Comments */ /* Dump Type Comments */
resetPQExpBuffer(q); resetPQExpBuffer(q);
...@@ -4937,13 +4937,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo) ...@@ -4937,13 +4937,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
tinfo->dobj.namespace->dobj.name, tinfo->usename, tinfo->dobj.namespace->dobj.name, tinfo->usename,
tinfo->dobj.catId, 0, tinfo->dobj.dumpId); tinfo->dobj.catId, 0, tinfo->dobj.dumpId);
/* Dump column comments */
tableInfo = findTableByOid(tinfo->typrelid);
if (tableInfo)
dumpTableComment(fout, tableInfo, "TABLE");
PQclear(res); PQclear(res);
destroyPQExpBuffer(q); destroyPQExpBuffer(q);
destroyPQExpBuffer(delq); destroyPQExpBuffer(delq);
destroyPQExpBuffer(query); destroyPQExpBuffer(query);
...@@ -6438,7 +6432,7 @@ dumpTable(Archive *fout, TableInfo *tbinfo) ...@@ -6438,7 +6432,7 @@ dumpTable(Archive *fout, TableInfo *tbinfo)
{ {
if (tbinfo->relkind == RELKIND_SEQUENCE) if (tbinfo->relkind == RELKIND_SEQUENCE)
dumpSequence(fout, tbinfo); dumpSequence(fout, tbinfo);
else if (!dataOnly && tbinfo->relkind != RELKIND_COMPOSITE_TYPE) else if (!dataOnly)
dumpTableSchema(fout, tbinfo); dumpTableSchema(fout, tbinfo);
/* Handle the ACL here */ /* Handle the ACL here */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment