Re: Add column and specify the column position in a table

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: emilu(at)encs(dot)concordia(dot)ca
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Add column and specify the column position in a table
Date: 2006-05-17 21:57:48
Message-ID: 446B9C5C.9080401@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Emi Lu wrote:
> Hello,
>
> 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.
>
> Could someone hint me please.

You can't. You can only add columns to the end of a table.

>
> Thanks alot!
> Ying Lu
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2006-05-17 21:58:34 Re: ALTER SEQUENCE
Previous Message Jim C. Nasby 2006-05-17 21:56:38 Re: FATAL: could not read statistics message