Re: Postgres automatically inserts chr(13) whenever chr(10) is inserted - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgres automatically inserts chr(13) whenever chr(10) is inserted
Date
Msg-id 318.1141396910@sss.pgh.pa.us
Whole thread Raw
In response to Postgres automatically inserts chr(13) whenever chr(10) is inserted  (Dragan Matic <mlists@panforma.co.yu>)
List pgsql-general
Dragan Matic <mlists@panforma.co.yu> writes:
> create table sample(column_sample varchar(500))
> insert into sample(column_sample) values('this is first row of text' ||
> chr(10) || 'this is second row of text')

> Now, instead of just inserting chr(10), postgres inserts chr(13) +
> chr(10).

Postgres most certainly does not do that, as even a moment's
experimentation (eg, with length()) will prove to you.  Take a closer
look at your client-side software to find out where the newline
conversion is happening.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: extended index info
Next
From: Tom Lane
Date:
Subject: Re: Physical column size