Re: RE : full featured alter table?

From: Sven Köhler <skoehler(at)upb(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: RE : full featured alter table?
Date: 2003-06-16 23:22:37
Message-ID: 3EEE513D.9040707@upb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> You could invent a syntax that supports both use cases, along the
> lines of
>
> ALTER ... POSITION <i> <column1> [ , <column2> ... ]

This idea is great, although the statement

ALTER TABLE <table> POSITION <i> <column>,<column>,...

might make the task to maintain the pg_attribute table more complicated
than the simple statement

ALTER TABLE <table> ALTER COLUMN <column> POSITION <i>

which can be transformed into 2 update-statements i think.
perhaps it would be simpler to define a statement like

ALTER TABLE <table> POSITIONS <column1> <i1>, <column2> <i2>, ...

which just means the following:

ALTER TABLE <table> ALTER COLUMN <oclumn1> POSITION <i1>
ALTER TABLE <table> ALTER COLUMN <oclumn2> POSITION <i2>

we wouldn't have such strong/complicated contraints for each <i>,
because each <i> can be >=1 and <= the column-count.

i don't know what i'd like most, but although your last suggestion looks
great, it makes it hard to estimate what's the result.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-16 23:35:26 Re: Postgres performance comments from a MySQL user
Previous Message Arjen van der Meijden 2003-06-16 23:03:02 Re: Postgres performance comments from a MySQL user