Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 25 Nov 2007 13:22:48 -0500
Lew <lew@xxxxxxxxxxxxxxxxxxxxxxx> 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


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux