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

Commitd63e41e

Browse files
committed
Fixed handling of renamed columns in PK constraints
1 parented7f37b commitd63e41e

File tree

4 files changed

+146
-77
lines changed

4 files changed

+146
-77
lines changed

‎src/bin/pg_dump/common.c

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.48 2000/12/03 20:45:37 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.49 2001/01/12 15:41:29 pjw Exp $
1212
*
1313
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1414
*
@@ -270,12 +270,14 @@ dumpSchema(Archive *fout,
270270
intnumInherits;
271271
intnumAggregates;
272272
intnumOperators;
273+
intnumIndices;
273274
TypeInfo*tinfo=NULL;
274275
FuncInfo*finfo=NULL;
275276
AggInfo*agginfo=NULL;
276277
TableInfo*tblinfo=NULL;
277278
InhInfo*inhinfo=NULL;
278279
OprInfo*oprinfo=NULL;
280+
IndInfo*indinfo=NULL;
279281

280282
if (g_verbose)
281283
fprintf(stderr,"%s reading user-defined types %s\n",
@@ -302,6 +304,11 @@ dumpSchema(Archive *fout,
302304
g_comment_start,g_comment_end);
303305
tblinfo=getTables(&numTables,finfo,numFuncs);
304306

307+
if (g_verbose)
308+
fprintf(stderr,"%s reading indices information %s\n",
309+
g_comment_start,g_comment_end);
310+
indinfo=getIndices(&numIndices);
311+
305312
if (g_verbose)
306313
fprintf(stderr,"%s reading table inheritance information %s\n",
307314
g_comment_start,g_comment_end);
@@ -336,9 +343,18 @@ dumpSchema(Archive *fout,
336343
if (g_verbose)
337344
fprintf(stderr,"%s dumping out tables %s\n",
338345
g_comment_start,g_comment_end);
339-
dumpTables(fout,tblinfo,numTables,inhinfo,numInherits,
346+
347+
dumpTables(fout,tblinfo,numTables,indinfo,numIndices,inhinfo,numInherits,
340348
tinfo,numTypes,tablename,aclsSkip,oids,schemaOnly,dataOnly);
341349

350+
if (fout&& !dataOnly)
351+
{
352+
if (g_verbose)
353+
fprintf(stderr,"%s dumping out indices %s\n",
354+
g_comment_start,g_comment_end);
355+
dumpIndices(fout,indinfo,numIndices,tblinfo,numTables,tablename);
356+
}
357+
342358
if (!tablename&& !dataOnly)
343359
{
344360
if (g_verbose)
@@ -377,35 +393,8 @@ dumpSchema(Archive *fout,
377393
clearTypeInfo(tinfo,numTypes);
378394
clearFuncInfo(finfo,numFuncs);
379395
clearInhInfo(inhinfo,numInherits);
380-
returntblinfo;
381-
}
382-
383-
/*
384-
* dumpSchemaIdx:
385-
* dump indexes at the end for performance
386-
*
387-
*/
388-
389-
externvoid
390-
dumpSchemaIdx(Archive*fout,constchar*tablename,
391-
TableInfo*tblinfo,intnumTables)
392-
{
393-
intnumIndices;
394-
IndInfo*indinfo;
395-
396-
if (g_verbose)
397-
fprintf(stderr,"%s reading indices information %s\n",
398-
g_comment_start,g_comment_end);
399-
indinfo=getIndices(&numIndices);
400-
401-
if (fout)
402-
{
403-
if (g_verbose)
404-
fprintf(stderr,"%s dumping out indices %s\n",
405-
g_comment_start,g_comment_end);
406-
dumpIndices(fout,indinfo,numIndices,tblinfo,numTables,tablename);
407-
}
408396
clearIndInfo(indinfo,numIndices);
397+
returntblinfo;
409398
}
410399

411400
/* flagInhAttrs -

‎src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ typedef z_stream *z_streamp;
6262

6363
#defineK_VERS_MAJOR 1
6464
#defineK_VERS_MINOR 4
65-
#defineK_VERS_REV23
65+
#defineK_VERS_REV24
6666

6767
/* Data block types */
6868
#defineBLK_DATA 1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp