Re: RE : full featured alter table?

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: RE : full featured alter table?
Дата
Msg-id 20030616170049.GH40542@flake.decibel.org
обсуждение исходный текст
Ответ на Re: RE : full featured alter table?  (Sven Köhler <skoehler@upb.de>)
Ответы Re: RE : full featured alter table?  (Sven Köhler <skoehler@upb.de>)
Список pgsql-general
On Mon, Jun 16, 2003 at 06:49:50PM +0200, Sven K?hler wrote:
> ALTER TABLE <table> ALTER COLUMN <column> POSITION <int i>
>
> where 1<=i<=number of cols in table and the given column will be moved
> between the (i-1)-th and the i-th column within the table.

I think that's fine. I think the normal case for doing this will be
after you've added a new column, I think it would be pretty rare to want
to re-order everything in the table. Of course if you did want to
re-order everything in the table, it would be easier to just specify the
list of column names in the new order you'd like to see them in.

> if a admin-tool wants to redefine the order of the columns, it just has
> to submit one command for every column with ascending positions.

BTW, I've heard a lot of people talking about 'dragging columns around
in select output', and I don't think that's a very good use case for
this. The order of columns should be considered to be part of the table
definition. Changing it should require the same privledges as adding or
dropping a column. If a front-end wants to provide some wiz-bang
interface customization on a per-user basis this isn't the mechanism
that should be used.
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

В списке pgsql-general по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: RE : full featured alter table?
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Why can't you define a table alias on an update?