Search Postgresql Archives

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

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

 



I'd expect this:

\copy tablename from 'filename.csv' WITH NULL as '' CSV HEADER

whould import "" as NULL.

The input file is UTF-8 (not Unicode/UTF-16).
I checked the hexdump and the "wannabe" NULL are actually
2c 22 22 2c -> ,"",

all fields are varchar that admit NULL

but still I get empty strings ('') in spite of NULL.

Am I missing something or it is a well known "feature"?

thx

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


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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