Minor Persistent Bug In pg_dump

From: "Frank Morton" <fmorton(at)base2inc(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Minor Persistent Bug In pg_dump
Date: 1999-01-08 21:19:49
Message-ID: 002d01be3b4c$9fd87930$8355e5ce@base2inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have posted this in quite a few places in the past without
response, so I'll try it here once. I am not on the list, so please
send any responses to me directly. This is a minor bug that
has continued through the latest release.

--------------------------------------------

This is a small bug in pg_dump that persists.

Say you want to have an text field with the contents
of "\Help\\" (not including the quotes).

If you do the following dialog:

createdb tempdb
psql tempdb
tempdb=>create table "testtable" ( "content" character(32));
tempdb=>insert into "testtable" values ('\\Help\\\\');
tempdb=>select * from testtable;

content
---------------------------------------
\Help\\

Up to this point, everything is cool. But now if you do the following:

pg_dump -d tempdb

You will see that the insert statement it generates is now invalid:

INSERT INTO "testtable" values ('\Help\\ ');

pg_dump needs to convert a single backslash to a double backslash
in order to be able to reload again as input to pgsql.

Am I missing something? Thanks for taking a look at this. I have posted
this to the list a few times without response and you seem to want to
get everything nailed down (Thanks!) so I thought I'd try you. If you want
me to send this somewhere else, please let me know.

Thanks for all you are doing with this great database.

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-01-08 21:43:38 Re: [GENERAL] postgresql v6.4.2 c funcs and null text pointers...
Previous Message Jackson, DeJuan 1999-01-08 21:19:43 RE: [GENERAL] Benchmarking PGSQL against Microsoft SQL 7.0?