> "Lou Duchez" <[EMAIL PROTECTED]> writes:
> > My copy of PostgreSQL has standard_conforming_strings set to "on", and when
> > I attempt to pg_dump tables that have strings containing CR/LFs, the data
> > dumps in a format that psql cannot then reload.
> 
> It works fine here.  Please provide a *complete* example of what you
> are doing.
> 
>                       regards, tom lane
> 

Hello,

Here is a complete example.  I have two Windows servers, one with PostgreSQL 
8.2.5, the 
other with 8.3 beta 3.  Both have standard_conforming_strings set to "on".  My 
"test" 
database is UTF8 on each server.  I perform the following steps on each server:



1)      Using pgAdmin III version 1.8, I create a table in my "test" database:

CREATE TABLE testtable
(
   column1 character varying(200) DEFAULT '', 
    PRIMARY KEY (column1)
) WITH (OIDS=FALSE);



2)      Again using pgAdmin, I add two rows to the table:

insert into testtable (column1) values ('This
is
a
multi
row
string'),
('This
is
another
multi
row
string');



3)      Then I run the following pg_dump command:

pg_dump -U postgres -E LATIN1 -t testtable testdatabase



The two versions of PostgreSQL produce slightly different results.  8.2.5 
generates the 
following "COPY" command:


COPY testtable (column1) FROM stdin;
This\nis\na\nmulti\nrow\nstring
This\nis\nanother\nmulti\nrow\nstring
\.



8.3 beta 3 generates the following "COPY" command:

COPY testtable (column1) FROM stdin;
This\
is\
a\
multi\
row\
string
This\
is\
another\
multi\
row\
string
\.



The 8.3 version, with the unescaped line breaks, confuses the heck out of psql.


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to