Re: Postgres automatically inserts chr(13) whenever chr(10) is inserted

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dragan Matic <mlists(at)panforma(dot)co(dot)yu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres automatically inserts chr(13) whenever chr(10) is inserted
Date: 2006-03-03 14:41:50
Message-ID: 318.1141396910@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dragan Matic <mlists(at)panforma(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-03 14:53:47 Re: Physical column size
Previous Message Tom Lane 2006-03-03 14:33:49 Re: extended index info