Re: \copy ... with null as '' csv doesn't get nulls

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема Re: \copy ... with null as '' csv doesn't get nulls
Дата
Msg-id 20071127190834.7680c83d@webthatworks.it
обсуждение исходный текст
Ответ на Re: \copy ... with null as '' csv doesn't get nulls  (Lew <lew@lwsc.ehost-services.com>)
Ответы Re: \copy ... with null as '' csv doesn't get nulls
Список pgsql-general
On Sun, 25 Nov 2007 13:22:48 -0500
Lew <lew@lwsc.ehost-services.com> wrote:

> I went to the docs for COPY and they say,
> > The default is \N (backslash-N) in text mode, and a empty value
> > with no quotes in CSV mode.

> That "with no quotes" phrase caught my attention.

> Try eliminating the double quotes in the CSV file.  "Wannabe" NULL
> would then be ,, (consecutive commas)
> in the CSV.  From the docs, you don't even need the "NULL AS"
> clause in your COPY statement.

Exactly what I did because fortunately there weren't too many chances
of weird stuff in 2000 records (sed -e 's/,""/,/g').

Anyway with NULL AS '' and without it I can't still import NULL
without pre-processing.

I thought it may be missing total support of UTF-8 or if I did
something wrong or it is actually a "feature".

thx

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Предыдущее
От: SHARMILA JOTHIRAJAH
Дата:
Сообщение: Re: postgres 8.3 beta 2 storage question
Следующее
От: Никоноров Григорий
Дата:
Сообщение: Re: Error while compiling PostgreSQL with Java