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 50A8ED1D098 for ; Thu, 8 Apr 2004 10:55:16 -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 39983-09 for ; Thu, 8 Apr 2004 10:55:15 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 036F8D1BAA5 for ; Thu, 8 Apr 2004 10:55:13 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 9248635478; Thu, 8 Apr 2004 06:55:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 90DFC35474; Thu, 8 Apr 2004 06:55:16 -0700 (PDT) Date: Thu, 8 Apr 2004 06:55:16 -0700 (PDT) From: Stephan Szabo To: Terry Hampton Cc: pgsql-admin@postgresql.org Subject: Re: Location of a new column In-Reply-To: <40754755.2020603@limacorp.com> Message-ID: <20040408064736.E93611@megazone.bigpanda.com> References: <40754755.2020603@limacorp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/148 X-Sequence-Number: 13121 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).