Re: copy command... - Mailing list pgsql-novice

From Brett W. McCoy
Subject Re: copy command...
Date
Msg-id Pine.LNX.4.30.0110261559500.5878-100000@chapelperilous.net
Whole thread Raw
In response to copy command...  ("Peter Tan" <kaihua@cs.stanford.edu>)
List pgsql-novice
On Fri, 26 Oct 2001, Peter Tan wrote:

> When using the copy command to bulk load data, could I specify the string of
> "end of record", insted of using newline? If the answer is no, is there any
> alternative way? I have lots of text files which I want to use copy command
> to load, but each row may contain several lines of text.

Is it character delimited data?  If you have newlines embedded into the
lines of data, you run the risk of storing those newlines in the database
fields also.  If you *do* want literal newlines in your data, you should
make them \n in the column data (that is a literal slash and an 'n'). I
think the newline (Unix newline) isn't optional to indicate an end of a
record.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Time is an illusion perpetrated by the manufacturers of space.


pgsql-novice by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Too much postmaster prozesses / CPU near 100%
Next
From: Jason Earl
Date:
Subject: Re: copy command...