pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Terry Hampton <thampton@limacorp.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Location of a new column
Date: Thu, 8 Apr 2004 06:55:16 -0700 (PDT)
Message-ID: <20040408064736.E93611@megazone.bigpanda.com> (raw)
In-Reply-To: <40754755.2020603@limacorp.com>
References: <40754755.2020603@limacorp.com>


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).



view thread (4+ messages)  latest in thread

Message-ID: <20040408064736.E93611@megazone.bigpanda.com>
Permalink:  ../20040408064736.E93611@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040408064736.E93611@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, thampton@limacorp.com
  Subject: Re: Location of a new column
  In-Reply-To: <20040408064736.E93611@megazone.bigpanda.com>
  References: <40754755.2020603@limacorp.com> <20040408064736.E93611@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox