summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-03-02 01:18:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-03-02 01:18:26 +0000
commit181f55e5fb4ba63324c5c15ab98a37f5dad53236 (patch)
tree5e773a908e89f55c239a0b28e6329ab28f3520fc /src/bin/pg_dump/common.c
parent305fcb7aa4de221a22a1b20d0116f87c8045c46b (diff)
Fix up pg_dump to emit shell-type definitions at the proper time, to
make use of the recently added ability to create a shell type explicitly. I also put in place some infrastructure to allow dump/no dump decisions to be made separately for each database object, rather than the former hardwired 'dump if in a dumpable schema' policy. This was needed anyway for shell types so now seemed a convenient time to do it. The flexibility isn't exposed to the user yet, but is ready for future extensions.
Diffstat (limited to 'src/bin/pg_dump/common.c')
-rw-r--r--src/bin/pg_dump/common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index 08497f35625..fd92a57ccfa 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.87 2005/10/15 02:49:38 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.88 2006/03/02 01:18:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -201,7 +201,7 @@ flagInhTables(TableInfo *tblinfo, int numTables,
continue;
/* Don't bother computing anything for non-target tables, either */
- if (!tblinfo[i].dump)
+ if (!tblinfo[i].dobj.dump)
continue;
/* Find all the immediate parent tables */
@@ -242,7 +242,7 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
continue;
/* Don't bother computing anything for non-target tables, either */
- if (!tbinfo->dump)
+ if (!tbinfo->dobj.dump)
continue;
numParents = tbinfo->numParents;
@@ -388,7 +388,7 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
* Given a newly-created dumpable object, assign a dump ID,
* and enter the object into the lookup table.
*
- * The caller is expected to have filled in objType and catalogId,
+ * The caller is expected to have filled in objType and catId,
* but not any of the other standard fields of a DumpableObject.
*/
void
@@ -397,6 +397,7 @@ AssignDumpId(DumpableObject *dobj)
dobj->dumpId = ++lastDumpId;
dobj->name = NULL; /* must be set later */
dobj->namespace = NULL; /* may be set later */
+ dobj->dump = true; /* default assumption */
dobj->dependencies = NULL;
dobj->nDeps = 0;
dobj->allocDeps = 0;