Re: Identifying Reason for Column Name Returned by SELECT - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Identifying Reason for Column Name Returned by SELECT
Date
Msg-id CAHyXU0yRKuHxrZY37axWyq+B-GyS5ZtxdGqEeQmW5k+9zhW1wA@mail.gmail.com
Whole thread Raw
In response to Re: Identifying Reason for Column Name Returned by SELECT  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Identifying Reason for Column Name Returned by SELECT  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
On Wed, Sep 14, 2011 at 12:04 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> On Wed, 14 Sep 2011, Steve Crawford wrote:
>
>> I suspect you have a multi-line entry and the '+' is just indicating that
>> the field continues.
>
> Steve, et al.:
>
>  It's not multi-line, but malformed.

It *is* mult-line.  psql uses a '+ to show line breaks:

postgres=# select E'a\nb';
 ?column?
----------
 a       +
 b
(1 row)

To fix your data, i'd consider using the replace() function to knock
out newlines:
postgres=# select replace(E'a\nb', E'\n', '');
 replace
---------
 ab
(1 row)

Also consider adjusting the app and/or the database to block them in the future.

merlin

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Arrays
Next
From: Steve Crawford
Date:
Subject: Re: Arrays