Re: importing data

Поиск
Список
Период
Сортировка
От Mental
Тема Re: importing data
Дата
Msg-id 20040119165335.GA1756@neverlight.com
обсуждение исходный текст
Ответ на Re: importing data  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: importing data  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sat, Jan 17, 2004 at 10:27:09PM -0500, Tom Lane wrote:
> Mental <Mental@NeverLight.com> writes:
> > 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.
>
> While it's certainly possible to do that, I don't see anyplace in the
> current documentation that recommends it.  What did you conclude that
> from?
>

http://www.postgresql.org/docs/7.3/static/sql-copy.html indicated:

\digits    , Backslash followed by one to three octal digits specifies the
character with that numeric code

We were having trouble with characters that were high ascii encoded.
Perhaps it was how we were connecting to do the import, but we found that
escaping them as so helped. After filtering, data is copied into the
tables like so:

ENCODING='SQL_ASCII'
$FILTER_DATA
psql -U $USER  -c "SET CLIENT_ENCODING TO '$ENCODING'; copy $i from
'$DATA_DIR/$i-noheader.tab' NULL as '' " $DB

--
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 по дате отправления:

Предыдущее
От: Jared Carr
Дата:
Сообщение: Getting rid of duplicate tables.
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: 7.4 -> 7.4.1 upgrade with customization on freebsd