Skip to content

Commit 18661f2

Browse files
committed
Revert badly-broken patch to dump comments on composite-type columns.
1 parent d6e05af commit 18661f2

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.383 2004/08/04 21:34:11 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.384 2004/08/06 18:18:42 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -2393,10 +2393,10 @@ getTables(int *numTables)
23932393
"d.classid = c.tableoid and d.objid = c.oid and "
23942394
"d.objsubid = 0 and "
23952395
"d.refclassid = c.tableoid and d.deptype = 'i') "
2396-
"where relkind in ('%c', '%c', '%c', '%c') "
2396+
"where relkind in ('%c', '%c', '%c') "
23972397
"order by c.oid",
23982398
RELKIND_SEQUENCE,
2399-
RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW, RELKIND_COMPOSITE_TYPE);
2399+
RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW);
24002400
}
24012401
else if (g_fout->remoteVersion >= 70300)
24022402
{
@@ -2419,10 +2419,10 @@ getTables(int *numTables)
24192419
"d.classid = c.tableoid and d.objid = c.oid and "
24202420
"d.objsubid = 0 and "
24212421
"d.refclassid = c.tableoid and d.deptype = 'i') "
2422-
"where relkind in ('%c', '%c', '%c', '%c') "
2422+
"where relkind in ('%c', '%c', '%c') "
24232423
"order by c.oid",
24242424
RELKIND_SEQUENCE,
2425-
RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW, RELKIND_COMPOSITE_TYPE);
2425+
RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW);
24262426
}
24272427
else if (g_fout->remoteVersion >= 70200)
24282428
{
@@ -4063,7 +4063,7 @@ dumpComment(Archive *fout, const char *target,
40634063
/*
40644064
* dumpTableComment --
40654065
*
4066-
* As above, but dump comments for both the specified table, view or composite type
4066+
* As above, but dump comments for both the specified table (or view)
40674067
* and its columns.
40684068
*/
40694069
static void
@@ -4864,7 +4864,6 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
48644864
int i_attname;
48654865
int i_atttypdefn;
48664866
int i;
4867-
TableInfo *tableInfo;
48684867

48694868
/* Set proper schema search path so type references list correctly */
48704869
selectSourceSchema(tinfo->dobj.namespace->dobj.name);
@@ -4929,6 +4928,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
49294928
tinfo->dobj.dependencies, tinfo->dobj.nDeps,
49304929
NULL, NULL);
49314930

4931+
49324932
/* Dump Type Comments */
49334933
resetPQExpBuffer(q);
49344934

@@ -4937,13 +4937,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
49374937
tinfo->dobj.namespace->dobj.name, tinfo->usename,
49384938
tinfo->dobj.catId, 0, tinfo->dobj.dumpId);
49394939

4940-
/* Dump column comments */
4941-
tableInfo = findTableByOid(tinfo->typrelid);
4942-
if (tableInfo)
4943-
dumpTableComment(fout, tableInfo, "TABLE");
4944-
49454940
PQclear(res);
4946-
49474941
destroyPQExpBuffer(q);
49484942
destroyPQExpBuffer(delq);
49494943
destroyPQExpBuffer(query);
@@ -6438,7 +6432,7 @@ dumpTable(Archive *fout, TableInfo *tbinfo)
64386432
{
64396433
if (tbinfo->relkind == RELKIND_SEQUENCE)
64406434
dumpSequence(fout, tbinfo);
6441-
else if (!dataOnly && tbinfo->relkind != RELKIND_COMPOSITE_TYPE)
6435+
else if (!dataOnly)
64426436
dumpTableSchema(fout, tbinfo);
64436437

64446438
/* Handle the ACL here */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy