Re: [HACKERS] pg_dump again - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] pg_dump again
Date
Msg-id 19371.916273366@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump again  (Mikhail Terekhov <terekhov@emc.com>)
Responses Re: [HACKERS] pg_dump again  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Mikhail Terekhov <terekhov@emc.com> writes:
> It seems that pg_dump (in 6.4.2) still has a problem when quoting
> \ and ' when these characters appears together.
> Consider the following example:
> ... snip ...
> terekhov(575)~>pg_dump -d -D -f ter.db terekhov

Ah, I see the problem: pg_dump's -d/-D option doesn't do quoting of
special characters properly --- in fact, the only thing it does do
is double-up single quote marks.  My testing was without that option ---
without -d or -D, pg_dump uses COPY, which quotes everything properly.
This is probably why most people weren't seeing a problem.

I'll put this on my to-do list for 6.5, but in the meantime, I'd suggest
not using -d or -D... a dump script with one INSERT per table row is
horribly slow compared to COPY anyway...
        regards, tom lane


pgsql-hackers by date:

Previous
From: SWagner17
Date:
Subject: unsubscribe
Next
From: Roland Roberts
Date:
Subject: Postgres 6.3.2 varchar <--> int4 conversions