Re: pg_migrator and handling dropped columns

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Subject: Re: pg_migrator and handling dropped columns
Date: 2009-02-12 18:00:28
Message-ID: 200902121800.n1CI0S415526@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I can think of three possible solutions, all involve recreating and
> > dropping the dropped column in the new schema:
>
> (4) add a switch to pg_dump to include dropped columns in its
> schema output and then drop them. This seems far more maintainable
> than writing separate code that tries to parse the output.

That would certainly be the easiest. I was going to have trouble
generating the exact column creation string anyway in pg_migrator.

I assume I would also drop the column in the pg_dump output.

Is this acceptable to everyone? We could name the option
-u/--upgrade-compatible.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2009-02-12 18:13:38 Re: GIN fast insert
Previous Message Teodor Sigaev 2009-02-12 17:56:58 Re: GIN fast insert database hang