Re: Location of a new column - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: Location of a new column
Date
Msg-id 20040408064736.E93611@megazone.bigpanda.com
Whole thread Raw
In response to Location of a new column  (Terry Hampton <thampton@limacorp.com>)
Responses Re: Location of a new column  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-admin
On Thu, 8 Apr 2004, Terry Hampton wrote:

>     I thought this was answered before, but I
>     could not find anything in my saved email.
>
>     I need to ALTER a table to add a new column.
>     I want the new column to be between two existing
>     columns,  however.     Didn't I see mention of
>     an "AFTER" parameter that specified the location
>     in the table where the new column should be
>     placed ?    Maybe not ..........     How then,
>     can I specify the location within the table,   of
>     new column ?

AFAIK, you can't using add column. It currently does no more than the
SQL92/99 spec requires in that respect (which is put the column at the
end).

About all you can do to put it somewhere else is a sequence with a new
table, copying data and renaming (and fixing constraints).

pgsql-admin by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Database storage bloat
Next
From: "Tom Bakken"
Date:
Subject: Re: Out of space