aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_dump.c')
-rw-r--r--src/bin/pg_dump/pg_dump.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index ed6663e2d63..ad7c0376c9b 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -2110,6 +2110,9 @@ dumpTableData(Archive *fout, TableDataInfo *tdinfo)
char *copyStmt;
const char *copyFrom;
+ /* We had better have loaded per-column details about this table */
+ Assert(tbinfo->interesting);
+
if (!dopt->dump_inserts)
{
/* Dump/restore using COPY */
@@ -2287,6 +2290,9 @@ makeTableDataInfo(DumpOptions *dopt, TableInfo *tbinfo, bool oids)
addObjectDependency(&tdinfo->dobj, tbinfo->dobj.dumpId);
tbinfo->dataObj = tdinfo;
+
+ /* Make sure that we'll collect per-column info for this table. */
+ tbinfo->interesting = true;
}
/*
@@ -15553,6 +15559,9 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
int j,
k;
+ /* We had better have loaded per-column details about this table */
+ Assert(tbinfo->interesting);
+
qrelname = pg_strdup(fmtId(tbinfo->dobj.name));
qualrelname = pg_strdup(fmtQualifiedDumpable(tbinfo));