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

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: (view raw, whole thread or download thread mbox)
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

-- Brett
Time is an illusion perpetrated by the manufacturers of space.

In response to

pgsql-novice by date

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

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