Re: copy command...

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: Peter Tan <kaihua(at)cs(dot)stanford(dot)edu>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: copy command...
Date: 2001-10-26 20:04:41
Message-ID: Pine.LNX.4.30.0110261559500.5878-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2001-10-26 20:05:30 Re: Too much postmaster prozesses / CPU near 100%
Previous Message Tom Lane 2001-10-26 19:28:03 Re: copy command...