Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1RKR6x03773 for ; Tue, 27 Feb 2001 15:27:07 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f1RKR3909391; Tue, 27 Feb 2001 15:27:03 -0500 (EST) To: Dan Lyke , pgsql-interfaces@postgresql.org, Peter Eisentraut Subject: Re: Double newline bug with DBD::Pg: Where best to fix? In-reply-to: <9351.983305318@sss.pgh.pa.us> References: <15003.65308.557357.318833@wynand.flutterby.com> <9351.983305318@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 27 Feb 2001 15:21:58 -0500" Date: Tue, 27 Feb 2001 15:27:03 -0500 Message-ID: <9388.983305623@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/185 X-Sequence-Number: 1149 >> test=# insert into xyz(stuff) values('a string with >> test'# >> test'# a two line break'); >> test=# select stuff from xyz; >> stuff >> ---------------------------------- >> a string with >> a two line break >> (1 row) >> (As you can see there are also some interesting issues with leading >> spaces going on here). On closer look, there is no leading-space issue. Psql is formatting the column with a leading space as it usually does, and the newline-space in the string is just being echoed. Compare: regression=# select 'a string without a newline'; ?column? ---------------------------- a string without a newline (1 row) regression=# select 'a string\nwith a newline'; ?column? ------------------------- a string with a newline (1 row) regression=# select 'a string\n with a newline'; ?column? -------------------------- a string with a newline (1 row) regression=# select 'a string regression'# with a newline'; ?column? ------------------------- a string with a newline (1 row) regression=# select 'a string regression'# with a newline'; ?column? -------------------------- a string with a newline (1 row) That's all fine IMHO. But this isn't: regression=# select 'a string regression'# regression'# with a newline'; ?column? ------------------------- a string with a newline (1 row) regards, tom lane