Re: [HACKERS] Re:pg_dump barfs?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] Re:pg_dump barfs?
Date: 1999-05-07 22:58:08
Message-ID: 199905072258.SAA14044@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-05-07 22:59:34 Re: [HACKERS] pg_dump problem?
Previous Message Bruce Momjian 1999-05-07 22:53:39 Re: [HACKERS] Hashjoin status report