Re: Toward a column reorder solution - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Toward a column reorder solution
Date
Msg-id AANLkTik3WQ+oMz0gMiDi04Q=EN63cJc+zbYamv19LfC5@mail.gmail.com
Whole thread Raw
In response to Re: Toward a column reorder solution  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Toward a column reorder solution
List pgsql-hackers
On Tue, Jul 27, 2010 at 5:45 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> Nilson wrote:
>>
>> Quoting  "wiki.postgresql.org/wiki/Alter_column_position
>> <http://wiki.postgresql.org/wiki/Alter_column_position>" :
>>
>> "The idea of allowing re-ordering of column position is not one the
>> postgresql developers are against, it is more a case where no one has
>> stepped forward to do the work."
>>
>> Well, a hard journey starts with a single step.
>>
>> Why not, in the next release that requires to run initdb, add a *attraw*
>>  column (a better name is welcome) in the catalog that stores the physical
>> position of column forever, i.e., the same semantics of *attnum*?
>>
>> Then, in a future release - 9.1 for example - the postgres team can make
>>  *attnum* changeable using something like ALTER COLUMN POSITION?
>>
>> Pros:
>>
>> - Requires only a couple of changes in main postgreSQL code. It seems to
>> be very simple.
>>
>> - Allows a smooth and decentralized rewrite of the whole code that may
>> needs the  *attraw *attribute - postgreSQL, contribs, pgAdmin, drivers,
>> tools  etc. This will give time to developers of that code to detect the
>> impact of  semantics change, make the arrangements  necessary and also allow
>> the release of production level software using the new feature before
>> *attnum *becomes changeable.
>> So, when *attnum *becomes read/write, all that software will be ready.
>>
>> Cons
>>
>> - More 4 bytes in each row of the catalog.
>>
>> Nilson
>
>
> Please review the previous discussions on this. In particular, see this
> proposal from Tom Lane that I believe represents the consensus way we want
> to go on this:
> <http://archives.postgresql.org/pgsql-hackers/2006-12/msg00983.php>

Alvaro is planning to work on this for 9.1, I believe.

http://archives.postgresql.org/pgsql-hackers/2010-07/msg00188.php

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: do we need to postpone beta4?
Next
From: Andrew Dunstan
Date:
Subject: Re: Toward a column reorder solution