Re: [HACKERS] Re:pg_dump barfs? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re:pg_dump barfs?
Date
Msg-id 199905072258.SAA14044@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re:pg_dump barfs?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> and since the column order of Child is different from before,
> a plain COPY won't reload it correctly (neither will an INSERT
> without explicit column labels).  What I'd suggest doing is
> dumping the old DB with pg_dump -o and then using a sed script
> or a quick little perl program to reorder the fields in the COPY
> data before you reload.

Good summary.  Another idea is to create temp uninherited copies of the
tables using SELECT A,B INTO TABLE new FROM ... and make the orderings
match, delete the old tables, recreate with inheritance, and do INSERT
.. SELECT, except you say you can't load oids.  Oops, that doesn't help.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] pg_dump problem?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Hashjoin status report