importing data

Поиск
Список
Период
Сортировка
От Mental
Тема importing data
Дата
Msg-id 20040118002625.GA29915@neverlight.com
обсуждение исходный текст
Ответы Re: importing data  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@NeverLight.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


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

Предыдущее
От: Leif K-Brooks
Дата:
Сообщение: Automatic joins?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Automatic joins?