pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Guillaume LELARGE <guillaume.lelarge@gmail.com>
Cc: emilu@encs.concordia.ca
Cc: pgsql-sql@postgresql.org
Subject: Re: Add column and specify the column position in a table
Date: Thu, 18 May 2006 10:00:14 -0400
Message-ID: <20060518140014.GA3122@surnet.cl> (raw)
In-Reply-To: <446C0BC0.7050805@gmail.com>
References: <446B9418.3080700@encs.concordia.ca>
	<446C0BC0.7050805@gmail.com>

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.



view thread (6+ messages)  latest in thread

Message-ID: <20060518140014.GA3122@surnet.cl>
Permalink:  ../20060518140014.GA3122@surnet.cl/
Also on:    postgresql.org/message-id/20060518140014.GA3122@surnet.cl

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: alvherre@commandprompt.com, guillaume.lelarge@gmail.com, emilu@encs.concordia.ca
  Subject: Re: Add column and specify the column position in a table
  In-Reply-To: <20060518140014.GA3122@surnet.cl>

* 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