copy command

Поиск
Список
Период
Сортировка
От Zhang, Anna
Тема copy command
Дата
Msg-id 5511D658682A7740BA295CCF1E1233A635A823@vsvapostal2.bkup3
обсуждение исходный текст
Список pgsql-admin
I have a problem to load data to postgres database using copy command. The
problem is that we have one column called address which is multi-line text,
the taxt file looks like this:

aab770|awkc.com administration|sultan 23
Bogota, na00000|CO

above shows one record with '|' as delimiters. Column 3 has two lines which
caused the record is splited into two lines. If I use copy command to load
this record, it is always treated as two records. Is there any way to tell
postgres to read until reach a specified char? not stop at '\n'?
Or maybe edit the text file to make it one line, but how?  We have milions
of such records in the text file.
Anyone can provide a solution, thanks a million!

Anna Zhang


В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: usetrace column in pg_shadow and pg_user
Следующее
От: Isabelle Brette
Дата:
Сообщение: Re: copy command