开发者

ERROR: missing data for column XXX, SQLState: 22P04 (bad_copy_file_format)

开发者 https://www.devze.com 2023-01-07 01:33 出处:网络
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 da

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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消