From: | "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com> |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org '" <pgsql-general(at)postgresql(dot)org> |
Subject: | using copy to load odd characters |
Date: | 2003-10-07 09:29:09 |
Message-ID: | 73309C2FDD95D11192E60008C7B1D5BB05FED9D7@snt452.corp.bcbsm.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Howdy:
Running PostgreSQL 7.3.3 on RedHat Linux 7.2
I'm trying to load data from a text file that
has an odd character in it (^@). From what I
could tell, it's a NULL character. How can I
load that into the database via the command line?
I've done the following:
[snip]
bcn2=> \copy db2_cn1pmemb from '/raid/backups/science/cn1pmemb.out' with
delimiter as '|' NULL as '\000'
\.
ERROR: copy: line 151676, Missing data for column "c_state"
lost synchronization with server, resetting connection
bcn2=> \copy db2_cn1pmemb from '/raid/backups/science/cn1pmemb.out' with
delimiter as '|' NULL as 'NULL'
\.
ERROR: copy: line 151676, Missing data for column "c_state"
lost synchronization with server, resetting connection
bcn2=> \copy db2_cn1pmemb from '/raid/backups/science/cn1pmemb.out' with
delimiter as '|' NULL as NULL
\.
ERROR: copy: line 151676, Missing data for column "c_state"
lost synchronization with server, resetting connection
bcn2=> \q
[/snip]
As well as '^@' and '\^@', but I haven't found anything that
works. Can someone tell me what I am doing wrong?
Thanks!
-X
From | Date | Subject | |
---|---|---|---|
Next Message | psql-mail | 2003-10-07 09:34:18 | Data partitioning? |
Previous Message | Tino Wildenhain | 2003-10-07 09:25:29 | Re: concenation of strings and null values |