I am exporting data from one database and importing into another
database. I dump the data from one database like so:
pg_dump dbname -R -a -f exportFile.sql
I then import the data using:
psql import_db -f exportFile.sql 1>>import_sql 2>>import_errorlog
However, when I do the import my import_errorlog gets filled with these
This is the big one. It seems to happen thousands and thousands of
psql:exportFile.sql:196563: invalid command \N
I don't know why it keeps happening!
These two are similar and I think...correct me if I am wrong...is caused
because there is a \r or a \t in a data field (probably a text field)
and this is confusing psql. But how do I get around this?? Do a search
and replace on \r and \t?? There must be a better way?
psql:exportFile.sql:196563: \r: extra argument "(416)" ignored
psql:exportFile.sql:203889: \t: extra argument "TNSA:" ignored
This is part of a sample data line where the above error occurs:
\N please ask for Frank Junior fr confirmation \r\n\r (416)
743-7378 \N \N s
This is another one. I think it happens when a table has no info in it
but shouldn't psql be able to handle this??
psql:exportFile.sql:97720: invalid command \.
This is sample data for the above error.
COPY getnext (client) FROM stdin;
One way around these errors *I guess*, is to export all the data as
inserts with column names...but this takes forever because I have a lot
of data. Any suggestions would be appreciated.
Synaptic Vision Inc
Fax- (416) 539-8280
1179A King St. West
Suite 309 M6K 3C5
pgsql-sql by date
|Next:||From: SVGK, Raju (Raju)||Date: 2004-08-20 15:55:54|
|Subject: view triggers/procedures|
|Previous:||From: Stephan Szabo||Date: 2004-08-20 15:04:13|
|Subject: Re: multi column foreign key for implicitly unique columns|