Skip to content

Commit 181f55e

Browse files
committed
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.
1 parent 305fcb7 commit 181f55e

File tree

4 files changed

+278
-118
lines changed

4 files changed

+278
-118
lines changed

src/bin/pg_dump/common.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.87 2005/10/15 02:49:38 momjian Exp $
14+
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.88 2006/03/02 01:18:24 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -201,7 +201,7 @@ flagInhTables(TableInfo *tblinfo, int numTables,
201201
continue;
202202

203203
/* Don't bother computing anything for non-target tables, either */
204-
if (!tblinfo[i].dump)
204+
if (!tblinfo[i].dobj.dump)
205205
continue;
206206

207207
/* Find all the immediate parent tables */
@@ -242,7 +242,7 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
242242
continue;
243243

244244
/* Don't bother computing anything for non-target tables, either */
245-
if (!tbinfo->dump)
245+
if (!tbinfo->dobj.dump)
246246
continue;
247247

248248
numParents = tbinfo->numParents;
@@ -388,7 +388,7 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
388388
* Given a newly-created dumpable object, assign a dump ID,
389389
* and enter the object into the lookup table.
390390
*
391-
* The caller is expected to have filled in objType and catalogId,
391+
* The caller is expected to have filled in objType and catId,
392392
* but not any of the other standard fields of a DumpableObject.
393393
*/
394394
void
@@ -397,6 +397,7 @@ AssignDumpId(DumpableObject *dobj)
397397
dobj->dumpId = ++lastDumpId;
398398
dobj->name = NULL; /* must be set later */
399399
dobj->namespace = NULL; /* may be set later */
400+
dobj->dump = true; /* default assumption */
400401
dobj->dependencies = NULL;
401402
dobj->nDeps = 0;
402403
dobj->allocDeps = 0;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy