On Fri, 26 Sep 2003, Peter Eisentraut wrote:
> scott.marlowe writes:
>
> > table name too, like Bruce said. The bothersome bit is that in pg_dump,
> > it says the line, relative to just this part of the copy command, so you
> > don't even know which table is giving the error.
>
> I don't see the problem. Can't you identify the failing command by the
> line number that psql gives you?
OK, here's the output from pg_dump while it's running
ERROR: function "odbc_user" already exists with same argument types
REVOKE
REVOKE
GRANT
You are now connected as new user "ayousuff".
ERROR: literal newline found in data
HINT: Use "\n" to represent newline.
CONTEXT: COPY FROM, line 59
You are now connected as new user "smarlowe".
You are now connected as new user "ayousuff".
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
You are now connected as new user "smarlowe".
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
So how am I supposed to figure out which table and which row broke? Keep
in mind, I'm doing this:
pg_dump -h otherserver dbname|psql -h desthost dbname
but I get basically the same thing if I dump it to a .sql file and do:
psql dbname <dbname.sql