COPY with multiple character delimiter?

Поиск
Список
Период
Сортировка
От Celia McInnis
Тема COPY with multiple character delimiter?
Дата
Msg-id 20050525154857.M17589@drmath.ca
обсуждение исходный текст
Список pgsql-novice
I will frequently have very large files of data which I'd like to be able to
load quickly into a database, but the delimiter used in the files is not a
single character (since the data could contain any character, a multiple
character delimiter was used). Hence I unfortunately can't use the postgresql
COPY command.

What's my best way of proceeding? Here are two possiblities I can think of:

1. Escape all of the tabs in my data, change the multiple-character delimiter
to a tab and then use copy.

2. Write a little perl script which does line by line processing and
inserting.

Is there any plan to have the COPY command allow multiple character
delimiters?

Also, I just read a user comment on the postgresql site
http://www.postgresql.org/docs/7.4/interactive/sql-copy.html that I may have
to escape some high-ascii values anyway. Is this true?

If so, can somebody send me the guy's filter program? I'm at work and his
site is not reachable from here. (I've never seen pornographic c code
before :-), but that's the message my work is giving me when denying me
access to his code at http://www.neverlight.com/~mental/pginput-filter.c )

Thanks,
Celia McInnis

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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: Migration from MySQL
Следующее
От: "Kevin Crenshaw"
Дата:
Сообщение: Re: Unable to Delete a Row