Search Postgresql Archives

Re: Identifying Reason for Column Name Returned by SELECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 14, 2011 at 12:04 PM, Rich Shepard <rshepard@xxxxxxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux