X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 854919FA293 for ; Thu, 18 May 2006 11:00:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 40628-10 for ; Thu, 18 May 2006 11:00:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from alvh.no-ip.org (201-220-122-179.bk10-dsl.surnet.cl [201.220.122.179]) by postgresql.org (Postfix) with ESMTP id 4AF289F9C18 for ; Thu, 18 May 2006 11:00:16 -0300 (ADT) Received: by alvh.no-ip.org (Postfix, from userid 1000) id 37835C37378; Thu, 18 May 2006 10:00:14 -0400 (CLT) Date: Thu, 18 May 2006 10:00:14 -0400 From: Alvaro Herrera To: Guillaume LELARGE Cc: emilu@encs.concordia.ca, pgsql-sql@postgresql.org Subject: Re: Add column and specify the column position in a table Message-ID: <20060518140014.GA3122@surnet.cl> Mail-Followup-To: Guillaume LELARGE , emilu@encs.concordia.ca, pgsql-sql@postgresql.org References: <446B9418.3080700@encs.concordia.ca> <446C0BC0.7050805@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <446C0BC0.7050805@gmail.com> User-Agent: Mutt/1.5.11+cvs20060403 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.825 tagged_above=0 required=5 tests=AWL, BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO, RCVD_IN_SORBS_DUL, RCVD_IN_XBL X-Spam-Level: * X-Archive-Number: 200605/141 X-Sequence-Number: 25172 Guillaume LELARGE wrote: > Emi Lu a écrit : > > I am trying to insert one column to a specific position in a table. > > > > In mysql, I can do: > > . create table test(id varchar(3), name varchar(12)); > > . alter table test add column givename varchar(12) after id; > > > > > > I am looking for similar things in postgresql to add a new column to the > > correct position in a table. > > There's no similar thing in PostgreSQL. You have to duplicate the table > to do it. ... which is the same thing MySQL does, only you must do it explicitely. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.