pg_dump incorrect output in plaintext mode

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump incorrect output in plaintext mode
Date: 2012-08-28 12:08:24
Message-ID: CABUevEyvhGBCfsHL5GkfXti4wSGBzVXgtP4fq3bZFTqAns6Zqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

$ pg_dump -v postgres -Fc -t t > /dev/null
...
pg_dump: dumping contents of table t
...

but in plaintext:
$ pg_dump -v postgres -Fp -t t > /dev/null
pg_dump: creating TABLE t
pg_dump: restoring data for table "t"
pg_dump: dumping contents of table t
pg_dump: setting owner and privileges for TABLE t
pg_dump: setting owner and privileges for TABLE DATA t

In particular, the "restoring data" is obviously completely wrong. But
AFAICT, the "creating table" and "setting owner" etc are also wrong...

This is because pg_dump calls RestoreArchive(fout).

Do we need to pass down a parameter all the way down the functions to
tell them if they're restoring or not?

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-08-28 14:04:29 Re: MySQL search query is not executing in Postgres DB
Previous Message Heikki Linnakangas 2012-08-28 11:26:38 SP-GiST micro-optimizations