Re: [SQL] pg_dumpall + psql -e template1 - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] pg_dumpall + psql -e template1
Date
Msg-id 7131.938212929@sss.pgh.pa.us
Whole thread Raw
In response to pg_dumpall + psql -e template1  (Clayton Cottingham <drfrog@smartt.com>)
Responses 11128.1 != 11128.1  (Radek Kanovsky <radekk@uh.cz>)
Re: [SQL] pg_dumpall + psql -e template1  (Sebestyen Zoltan <szoli@netvisor.hu>)
List pgsql-sql
Clayton Cottingham <drfrog@smartt.com> writes:
> when i dump out all dbspg_dumpall>dbs.out and try to put into a new
> installation psql -e template1 <dbs.out it always fails when trying to
> copy the actual data
> usually producing errors that result in the \? listings and then a seq
> fault

There have been some reports that COPY in/out is not careful enough
about quoting control characters and so forth, so if you have text
fields containing control characters you might run into a problem
like the above.

As a quick workaround, try the pg_dump switch to dump data as INSERT
statements instead of with COPY.  It'll be a lot slower to load :(
but if it avoids the problem then this is probably the correct
diagnosis.

If you can track down exactly what data is making COPY misbehave,
we'd have a better shot at fixing the bug.
        regards, tom lane


pgsql-sql by date:

Previous
From: Clayton Cottingham
Date:
Subject: pg_dumpall + psql -e template1
Next
From: "omid omoomi"
Date:
Subject: RE: [SQL] comparing 2 tables. . .