Fix problems with pg_dump for iheritance, sequences, archive tables.
This commit is contained in:
parent
b6d983559a
commit
a7d417cc2f
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* these routines moved here from commands/define.c and somewhat cleaned up.
|
||||
@ -237,7 +237,7 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
|
||||
*/
|
||||
i = 0;
|
||||
values[i++] = PointerGetDatum(operatorName);
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid);
|
||||
values[i++] = Int32GetDatum(GetUserId());
|
||||
values[i++] = (Datum) (uint16) 0;
|
||||
|
||||
values[i++] = (Datum)'b'; /* fill oprkind with a bogus value */
|
||||
|
@ -21,7 +21,7 @@
|
||||
*
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@ -781,6 +781,14 @@ clearTableInfo(TableInfo *tblinfo, int numTables)
|
||||
{
|
||||
int i,j;
|
||||
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].relname) free (tblinfo[i].relname);
|
||||
if(tblinfo[i].relarch) free (tblinfo[i].relarch);
|
||||
@ -803,9 +811,9 @@ clearInhInfo (InhInfo *inh, int numInherits) {
|
||||
int i;
|
||||
if(!inh) return;
|
||||
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].inhparent) free(inh[i].inhparent);}
|
||||
if(inh[i].inhparent) free(inh[i].inhparent);
|
||||
}
|
||||
free(inh);
|
||||
}
|
||||
|
||||
@ -845,7 +853,8 @@ for(i=0;i<numIndices;++i) {
|
||||
if(ind[i].indisunique) free(ind[i].indisunique);
|
||||
for(a=0;a<INDEX_MAX_KEYS;++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);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@ -85,7 +85,6 @@ typedef struct _tableInfo {
|
||||
} TableInfo;
|
||||
|
||||
typedef struct _inhInfo {
|
||||
char *oid;
|
||||
char *inhrel;
|
||||
char *inhparent;
|
||||
} InhInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user