Copy NULL in PostgreSQL database -


i trying copy csv file postgres 9.5.3 , running issues null. file encoded in ascii, client_encoding utf-8, , server encoding utf-8. null in quoted string shown below.

enter image description here

i error

error:  invalid byte sequence encoding "utf8": 0x00 context:  copy test_null, line 1 ********** error **********  error: invalid byte sequence encoding "utf8": 0x00 sql state: 22021 context: copy test_null, line 1 

my table structure

create table test_null(nullcolumn char(10));  copy test_null 'f:\user area\dcs.txt' csv  null 'null'; 

i have tried escaping specifying "\", , tried other options of copy command, nothing seems work. not sure, how process this.

your file contains ascii 0 characters, rejected postgresql.

you'll have use other representation null values if want load them database copy.


Comments

Popular posts from this blog

c# - ajax - How to receive data both html and json from server? -

swift - Button on Table View Cell connected to local function -