multi line text data/query ?bug?

From: "Sim Zacks" <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: multi line text data/query ?bug?
Date: 2005-03-22 07:00:44
Message-ID: d1ofuc$1vuq$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

While I was testing an issue in python I discovered a general
*nix/windows/mac issue with newlines.
The same query will give different results depending on what client executes
it.

create table test1(f1 text);

insert into test1 values('this is a long string.
it will have new lines in it.
I want to see if those new lines go away.
so ignore. the ugliness')

If the insert was done on a Windows machine there will be a CRLF as the
EOLN, if done on Unix it will have LF and if done on Mac it will have CR.

So if the insert was done on windows, the following query will only work
from a windows client :
select * from test1 where f1='this is a long string.
it will have new lines in it.
I want to see if those new lines go away.
so ignore. the ugliness'

If that insert was done on a *NIX then the query will only work from that
client

Responses

Browse pgsql-general by date

  From Date Subject
Next Message FERREIRA William (COFRAMI) 2005-03-22 08:13:58 Re: pl/perl problem
Previous Message Neil Conway 2005-03-22 05:19:06 Re: Clearing locks