Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18661f2

Browse files
committed
Revert badly-broken patch to dump comments on composite-type columns.
1 parentd6e05af commit18661f2

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
elseif (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
elseif (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, vieworcomposite type
4066+
* As above, but dump comments for both the specified table (orview)
40674067
* and its columns.
40684068
*/
40694069
staticvoid
@@ -4864,7 +4864,6 @@ dumpCompositeType(Archive *fout, TypeInfo *tinfo)
48644864
inti_attname;
48654865
inti_atttypdefn;
48664866
inti;
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-
elseif (!dataOnly&&tbinfo->relkind!=RELKIND_COMPOSITE_TYPE)
6435+
elseif (!dataOnly)
64426436
dumpTableSchema(fout,tbinfo);
64436437

64446438
/* Handle the ACL here */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp