Re: copy command...

Поиск
Список
Период
Сортировка
От Brett W. McCoy
Тема Re: copy command...
Дата
Msg-id Pine.LNX.4.30.0110261559500.5878-100000@chapelperilous.net
обсуждение исходный текст
Ответ на copy command...  ("Peter Tan" <kaihua@cs.stanford.edu>)
Список 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 по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Too much postmaster prozesses / CPU near 100%
Следующее
От: Jason Earl
Дата:
Сообщение: Re: copy command...