Skip site navigation (1) Skip section navigation (2)

Re: Location of a new column

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Terry Hampton <thampton(at)limacorp(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Location of a new column
Date: 2004-04-12 21:44:31
Message-ID: 1081806272.22969.76.camel@camel (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Thu, 2004-04-08 at 09:55, Stephan Szabo wrote:
> 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).

IIRC this option is available in 7.5. At least I seem to remember some
(Chris K-L) posting a patch and it getting committed. You could check
the developers docs to verify I suppose.

Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to


pgsql-admin by date

Next:From: Tom LaneDate: 2004-04-12 22:36:09
Subject: Re: Location of a new column
Previous:From: Tom LaneDate: 2004-04-12 13:53:52
Subject: Re: host & hostssl entries in single pg_hba.conf

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group