pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_dump: Fix dumping of WITH OIDS tables
2+ messages / 1 participants
[nested] [flat]

* pgsql: pg_dump: Fix dumping of WITH OIDS tables
@ 2018-11-13 08:54  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2018-11-13 08:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@pipelinedb.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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: pg_dump: Fix dumping of WITH OIDS tables
@ 2018-11-13 08:54  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2018-11-13 08:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@pipelinedb.com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6178f3cb798f2ea9011c55e99973f838719c550e

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-11-13 08:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 08:54 pgsql: pg_dump: Fix dumping of WITH OIDS tables Peter Eisentraut <peter_e@gmx.net>
2018-11-13 08:54 pgsql: pg_dump: Fix dumping of WITH OIDS tables Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox