Re: ALTER TABLE TODO items

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)svr1(dot)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE TODO items
Date: 2004-05-05 17:04:31
Message-ID: 1083776671.14683.478.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, 2004-05-05 at 10:36, Bruce Momjian wrote:
>
> TODO items completed:
>
> o -ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
> o -ALTER TABLE ADD COLUMN column DEFAULT should fill existing
> rows with DEFAULT value
> o -Allow ALTER TABLE to modify column lengths and change to binary
> compatible types
>
> Seems we didn't have ALTER COLUMN TYPE on the TODO list.
>
> Do we still want this TODO?
>
> o Allow columns to be reordered using ALTER ... POSITION i col1 [,col2];
> have SELECT * and INSERT honor such ordering
>
> I don't think so. As I remember it was part of doing logical attribute
> numbers as a way to add ALTER COLUMN TYPE, but because we now use table
> recreate to implement this, it is unlikely we will ever add logical
> attribute numbers (adds too much complexity to the code).
>

I think we should leave since it is still functionality that people will
want. Furthermore I am not sure we are done with ALTER COLUMN TYPE
completely. Granted I've not yet had time to take a thorough look at the
implementation so I could be off here, but as I understand it the
current code seems a little problematic on large tables; recreating the
entire table is likely to cause excessive i/o and disk space issues
compared to a potentially much nicer add column/update column/drop
column routine.

Hmm... upon further thought, if the above implementation stands up, istm
that its machinations could also be used to implement the reordering
functionality... ie. rewrite the table and fix up any dependencies as
needed.

way to back track on myself eh?

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2004-05-05 17:06:56 pgsql-server/src/backend/commands typecmds.c
Previous Message Bruce Momjian 2004-05-05 16:53:41 Re: ALTER TABLE TODO items

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-05-05 17:14:52 Re: Multiple Xids in PGPROC?
Previous Message Bruce Momjian 2004-05-05 17:01:23 Re: Postgres Crashes