COPY with multiple character delimiter? - Mailing list pgsql-novice

From Celia McInnis
Subject COPY with multiple character delimiter?
Date
Msg-id 20050525154857.M17589@drmath.ca
Whole thread Raw
List 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 by date:

Previous
From: Sean Davis
Date:
Subject: Re: Migration from MySQL
Next
From: "Kevin Crenshaw"
Date:
Subject: Re: Unable to Delete a Row