pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it>
Cc: pgsql-sql@postgresql.org
Subject: Re: Alter Table
Date: Thu, 15 Mar 2007 11:13:18 -0500
Message-ID: <1173975198.12681.40.camel@state.g2switchworks.com> (raw)
In-Reply-To: <00de01c76706$d37d56e0$1102a8c0@dream>
References: <00de01c76706$d37d56e0$1102a8c0@dream>

On Thu, 2007-03-15 at 08:35, Shavonne Marietta Wijesinghe wrote:
> When i alter a table and add a new column it always adds it to the end
> of the table. Is there any way to tell it to add the new column at the
> 5th position or to add the new column after a surtain column.

No, but the good news is you can just recreate the table once it's
stabilized in form with something like:

create table new_table as select field1, field4, field2, field3 from
old_table;



view thread (22+ messages)

Message-ID: <1173975198.12681.40.camel@state.g2switchworks.com>
Permalink:  ../1173975198.12681.40.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1173975198.12681.40.camel@state.g2switchworks.com

 · 

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: smarlowe@g2switchworks.com, shavonne.marietta@studioform.it
  Subject: Re: Alter Table
  In-Reply-To: <1173975198.12681.40.camel@state.g2switchworks.com>

* 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