1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

Fix problems with pg_dump for iheritance, sequences, archive tables.

This commit is contained in:
Bruce Momjian
1997-07-23 17:15:13 +00:00
parent b6d983559a
commit a7d417cc2f
3 changed files with 109 additions and 101 deletions

View File

@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.8 1996/12/26 17:46:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.9 1997/07/23 17:14:34 momjian Exp $
* *
* NOTES * NOTES
* these routines moved here from commands/define.c and somewhat cleaned up. * these routines moved here from commands/define.c and somewhat cleaned up.
@@ -237,7 +237,7 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
*/ */
i = 0; i = 0;
values[i++] = PointerGetDatum(operatorName); values[i++] = PointerGetDatum(operatorName);
values[i++] = ObjectIdGetDatum(InvalidOid); values[i++] = Int32GetDatum(GetUserId());
values[i++] = (Datum) (uint16) 0; values[i++] = (Datum) (uint16) 0;
values[i++] = (Datum)'b'; /* fill oprkind with a bogus value */ values[i++] = (Datum)'b'; /* fill oprkind with a bogus value */

View File

@@ -21,7 +21,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.33 1997/06/20 02:20:17 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.34 1997/07/23 17:14:59 momjian Exp $
* *
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* *
@@ -781,6 +781,14 @@ clearTableInfo(TableInfo *tblinfo, int numTables)
{ {
int i,j; int i,j;
for(i=0;i<numTables;++i) { for(i=0;i<numTables;++i) {
/* skip archive tables */
if (isArchiveName(tblinfo[i].relname))
continue;
if ( tblinfo[i].sequence )
continue;
if(tblinfo[i].oid) free (tblinfo[i].oid); if(tblinfo[i].oid) free (tblinfo[i].oid);
if(tblinfo[i].relname) free (tblinfo[i].relname); if(tblinfo[i].relname) free (tblinfo[i].relname);
if(tblinfo[i].relarch) free (tblinfo[i].relarch); if(tblinfo[i].relarch) free (tblinfo[i].relarch);
@@ -803,9 +811,9 @@ clearInhInfo (InhInfo *inh, int numInherits) {
int i; int i;
if(!inh) return; if(!inh) return;
for(i=0;i<numInherits;++i) { for(i=0;i<numInherits;++i) {
if(inh[i].oid) free(inh[i].oid);
if(inh[i].inhrel) free(inh[i].inhrel); if(inh[i].inhrel) free(inh[i].inhrel);
if(inh[i].inhparent) free(inh[i].inhparent);} if(inh[i].inhparent) free(inh[i].inhparent);
}
free(inh); free(inh);
} }
@@ -845,7 +853,8 @@ for(i=0;i<numIndices;++i) {
if(ind[i].indisunique) free(ind[i].indisunique); if(ind[i].indisunique) free(ind[i].indisunique);
for(a=0;a<INDEX_MAX_KEYS;++a) { for(a=0;a<INDEX_MAX_KEYS;++a) {
if(ind[i].indkey[a]) free(ind[i].indkey[a]); if(ind[i].indkey[a]) free(ind[i].indkey[a]);
if(ind[i].indclass[a]) free(ind[i].indclass[a]);} if(ind[i].indclass[a]) free(ind[i].indclass[a]);
}
} }
free(ind); free(ind);
} }

View File

@@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_dump.h,v 1.16 1997/06/21 16:08:15 momjian Exp $ * $Id: pg_dump.h,v 1.17 1997/07/23 17:15:13 momjian Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
@@ -85,7 +85,6 @@ typedef struct _tableInfo {
} TableInfo; } TableInfo;
typedef struct _inhInfo { typedef struct _inhInfo {
char *oid;
char *inhrel; char *inhrel;
char *inhparent; char *inhparent;
} InhInfo; } InhInfo;