| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| 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 09:14:40 |
| Message-ID: | 20060303091440.GA35923@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Mar 03, 2006 at 08:47:00AM +0100, Dragan Matic wrote:
> 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). Is there a way to avoid this? Database is on a linux server
> with SQL_ASCII encoding, clients are winXP communicating thru ODBC.
How did you determine what characters are being inserted? What's
the output of the following example?
INSERT INTO sample VALUES ('a' || chr(10) || 'b');
SELECT length(column_sample), decode(column_sample, 'escape') FROM sample;
--
Michael Fuhr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Agnes Bocchino | 2006-03-03 09:56:02 | Re: How to save and restore a template database ? |
| Previous Message | Dragan Matic | 2006-03-03 07:47:00 | Postgres automatically inserts chr(13) whenever chr(10) is inserted |