X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BD46DD1D080 for ; Mon, 12 Apr 2004 18:45:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 89658-07 for ; Mon, 12 Apr 2004 18:44:52 -0300 (ADT) Received: from bramble.mmrd.com (unknown [65.217.53.66]) by svr1.postgresql.org (Postfix) with ESMTP id 82686D1D09E for ; Mon, 12 Apr 2004 18:44:48 -0300 (ADT) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by bramble.mmrd.com (8.12.8/8.12.8) with ESMTP id i3CLkucM001457; Mon, 12 Apr 2004 17:46:59 -0400 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id i3CLiWl11541; Mon, 12 Apr 2004 17:44:32 -0400 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id FVMA8ZX7; Mon, 12 Apr 2004 17:44:30 -0400 Subject: Re: Location of a new column From: Robert Treat To: Stephan Szabo Cc: Terry Hampton , pgsql-admin@postgresql.org In-Reply-To: <20040408064736.E93611@megazone.bigpanda.com> References: <40754755.2020603@limacorp.com> <20040408064736.E93611@megazone.bigpanda.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 12 Apr 2004 17:44:31 -0400 Message-Id: <1081806272.22969.76.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/191 X-Sequence-Number: 13164 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