pgsql: pg_dump: Fix dumping of WITH OIDS tables

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_dump: Fix dumping of WITH OIDS tables
Date: 2018-11-13 08:54:25
Message-ID: E1gMUSn-0004BK-I9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_dump: Fix dumping of WITH OIDS tables

A table with OIDs that was the first in the dump output would not get
dumped with OIDs enabled. Fix that.

The reason was that the currWithOids flag was declared to be bool but
actually also takes a -1 value for "don't know yet". But under
stdbool.h semantics, that is coerced to true, so the required SET
default_with_oids command is not output again. Change the variable
type to char to fix that.

Reported-by: Derek Nelson <derek(at)pipelinedb(dot)com>

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b72b4fafb962c5cc1c3d2311b2971a299497202b

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-11-13 12:52:22 pgsql: doc: Fix minor whitespace issue
Previous Message Thomas Munro 2018-11-13 06:04:18 pgsql: Fix const correctness warning.