Re: RE : full featured alter table?

From: Sven Köhler <skoehler(at)upb(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: RE : full featured alter table?
Date: 2003-06-16 16:49:50
Message-ID: bcksce$5gj$1@main.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-06-16 16:56:29 Re: RE : full featured alter table?
Previous Message Jan Wieck 2003-06-16 16:49:44 Re: full featured alter table?