I'm using PostgreSQL COPY FROM
/ COPY TO
command to move data from my production environment table to my development environment table (they have the same structure, constraints, etc). I export my data using COPY TO
command and that's OK, but problem occurs where I try to import that data using COPY FROM
. I get an error:
ERROR: missing data for column XXX, SQLState: 22P04 (bad_copy_file_format).
Both, production and development environment, are on the same machine running on Win XP SP3, PostgreSQL 8.3.
Command:
COPY table_name
TO 'C:/copy_export/ta开发者_JS百科ble_name_export.csv'
WITH NULL as '\N'
delimiter ','
CSV
QUOTE AS '\''
FORCE QUOTE col1, col2, col3, col4
I didn't use USING DELIMITERS ',' in my COPY FROM statement!!!! I'm down-voting my question :)
精彩评论