On Thu, 5 May 2011, Lacey L. Powers wrote:
> In all of the times where I've migrated data from MySQL to PostgreSQL,
> this is all I have needed, for example:
>
> COPY table (col1,col2,col3,col4) FROM stdin;
Lacey,
The data are not coming from stdin but from files on the disk.
I have at the bottom of the DDL file lines such as these:
COPY comments FROM 'comments.csv' WITH DELIMITER '|';
COPY experts FROM 'experts.csv' WITH DELIMITER '|';
and the first couple of lines of comments.csv are:
7|J. D. Hardy|animal|1996-06-13 14:51:08|1996-06-17
8|J. D. Hardy|annelida|1996-06-13 14:51:08|1996-06-17
I could add WITH NULL AS "" to the commands.
Thanks,
Rich