From: | Mental <Mental(at)NeverLight(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | importing data |
Date: | 2004-01-18 00:26:25 |
Message-ID: | 20040118002625.GA29915@neverlight.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello, perhaps you may have some advice.
The postgresql documentation for COPY FROM INFILE suggests that high-ascii
characters be encoded to a backslash followed by the octal value for the
character.
In addition to this change, to insert a backslash, a double-bacckslash must be
emitted.
After we discovered this we wrote a short filter program to pipe input data
through to encode high-ascii characters correctly as well as escape slashes.
This program can be seen here:
http://www.neverlight.com/~mental/pginput-filter.c
What we're wondering about is, is there perhaps a better or easier way to
handle data like this? Granted we didnt spend a ton of time on google, but
we did search the docs a little before settling on a filter for the sake
of expediency.
--
Mental (Mental(at)NeverLight(dot)com)
I've been told that I need to warn people about inappropriate content.
So if anything I say or post is inappropriate, dont look at it.
GPG public key: http://www.neverlight.com/pas/Mental.asc
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2004-01-18 00:58:43 | Re: Automatic joins? |
Previous Message | Leif K-Brooks | 2004-01-18 00:06:52 | Automatic joins? |