Skip site navigation (1) Skip section navigation (2)

Re: Inserting TEXT with multiple lines

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rick Jones <RJones(at)NAHRO(dot)org>
Cc: "Pgsql-Novice (E-mail)" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Inserting TEXT with multiple lines
Date: 2001-01-22 22:00:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Rick Jones <RJones(at)NAHRO(dot)org> writes:
> In my table there is a "synopsis" field that I want to change so that it
> displays with line breaks (ColdFusion client). Is there an easy way to do
> this? I've tried INSERT. I've used COPY ... FROM with the table and then
> made the modification (using \n for the carriage returns) then tried COPY
> ... TO. When I do that I get the following error:

"\n" should work to represent a newline in COPY data.

> ": can't parse "ne 1, pg_atoi: error in "112

Looks to me like your editor changed all the line endings to \r\n.
Try using a less Windows-ish editor.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Andy ArledgeDate: 2001-01-23 01:29:05
Subject: pg_exec : problem
Previous:From: Rick JonesDate: 2001-01-22 18:35:16
Subject: Inserting TEXT with multiple lines

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group