Re: [HACKERS] pg_dump again

Lists: Postg스포츠 토토 결과SQL
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mikhail Terekhov <terekhov(at)emc(dot)com>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] pg_dump again
Date: 1999-01-14 00:22:46
Message-ID: 19371.916273366@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg스포츠 토토 결과SQL

Mikhail Terekhov <terekhov(at)emc(dot)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


From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: terekhov(at)emc(dot)com, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] pg_dump again
Date: 1999-03-15 14:25:27
Message-ID: 199903151425.JAA11969@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom, is this fixed?

> Mikhail Terekhov <terekhov(at)emc(dot)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
>
>

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026