Re: Column reordering in pg_dump

From: Decibel! <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "hernan gonzalez" <hgonzalez(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Column reordering in pg_dump
Date: 2008-11-25 21:10:30
Message-ID: F5F50792-8B6E-4273-9537-BB8FEEC12459@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Nov 14, 2008, at 12:12 PM, Tom Lane wrote:
> "hernan gonzalez" <hgonzalez(at)gmail(dot)com> writes:
>> I've added an option to pg_dump to reorder
>> columns in the ouput "CREATE TABLE" dump.
>
> This doesn't seem like a particularly good idea to me. In the first
> place, pg_dump is a tool for reproducing your database, not
> altering it,
> so it seems like basically the wrong place to be inserting this
> type of
> feature. (There's been some talk of a Postgres ETL tool, which
> would be
> the right place, but so far it's only talk :-(.) In the second place,
> column order is actually a pretty delicate affair when you start to
> think about table inheritance situations and tables that have been
> altered via ADD/DROP COLUMN. We had bugs in pg_dump in the past with
> its ability to deal with column order in such cases. So I'm not
> nearly
> as optimistic as you are that such a feature is incapable of causing
> problems.

IIRC the community did come to a consensus on allowing for a
different logical ordering from physical ordering, it was an issue of
actually doing the work. If this is an itch you want to scratch, you
might look into fixing that problem instead.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-25 21:46:39 Re: blatantly a bug in the documentation
Previous Message Rob Kirkbride 2008-11-25 21:05:58 Re: Enhancement to pg_dump