postgres.git / summary / log / commit / refs
commit 2661a793ff59149af1d844d6be504e421c04733e
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Wed Jul 08 18:52:39 2020 +0000
First released in: 14.0
Don't treat DumpOptions->dump_inserts like a boolean
This has been an integer count since 7e413a0f82c8 so treat it explicitly
like an integer.
No backpatch since this is just cosmetic.
src/bin/pg_dump/pg_backup.h | 2 +-
src/bin/pg_dump/pg_dump.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h
index 8c0cedcd983..b17c9dbb8be 100644
--- a/src/bin/pg_dump/pg_backup.h
+++ b/src/bin/pg_dump/pg_backup.h
@@ -71,7 +71,7 @@ typedef struct _restoreOptions
char *use_role; /* Issue SET ROLE to this */
int dropSchema;
int disable_dollar_quoting;
- int dump_inserts;
+ int dump_inserts; /* 0 = COPY, otherwise rows per INSERT */
int column_inserts;
int if_exists;
int no_comments; /* Skip comments */
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index c2627bb630b..45946eec463 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -2254,7 +2254,7 @@ dumpTableData(Archive *fout, TableDataInfo *tdinfo)
char *copyStmt;
const char *copyFrom;
- if (!dopt->dump_inserts)
+ if (dopt->dump_inserts == 0)
{
/* Dump/restore using COPY */
dumpFn = dumpTableData_copy;
[parent: 1c4e88e2fe41]