Re: RE : full featured alter table?

Поиск
Список
Период
Сортировка
От Sven Köhler
Тема Re: RE : full featured alter table?
Дата
Msg-id bcksce$5gj$1@main.gmane.org
обсуждение исходный текст
Ответ на Re: RE : full featured alter table?  (Mike Mascari <mascarm@mascari.com>)
Ответы Re: RE : full featured alter table?  ("Jim C. Nasby" <jim@nasby.net>)
Список pgsql-general
> "The columns are referenced in the ascending sequence of their ordinal
> position within T."
>
> As Tom pointed out earlier, it may not make sense purely from a
> relational point of view, but it is required by the standard. Given
> that it is required, it would be nice if the user could modify the
> ordinal position within T.

Now that there are some people that agree with me that this feature can
be handy, i thought about how an alter table command should look like to
re-order columns.

how about

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.

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.

is this acceptable?
if i understood the other people correct, than we need such a command,
because no user can access the pg_attribute table directly, right?


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

Предыдущее
От: Sergei Levchenko
Дата:
Сообщение: tsearch - v2
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: full featured alter table?