Re: Altering a table - positioning new columns

From: "Chris Boget" <chris(at)wild(dot)net>
To: "Manfred Koizar" <mkoi-pg(at)aon(dot)at>
Cc: "PGSql General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Altering a table - positioning new columns
Date: 2003-01-20 15:28:50
Message-ID: 01f201c2c098$a2000ef0$8c01a8c0@ENTROPY
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> No. Sorry.

*sigh* That kind of bites.
I'm curious how difficult this would be to implement...

> If column order is important, you have to create a new table and copy
> over the data, then drop the old table and rename the new one.

Yeah, that's what I've been doing all weekend.

> Of course this has its drawbacks, if there are triggers, foreign keys, ...

Yeah, these are pretty serious drawbacks. It took me 30+ minutes to do
this for just _one_ table. I don't like new fields trailing the column list because
I prefer all similar columns to be grouped. That way if you are viewing the
data through a UI, it's easier to see/read.
But I guess unless I want to spend hours adding a few columns to some
tables, I'm just going to have to learn to live with it... :|

Chris

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-01-20 15:33:30 Re: Database Performance problem
Previous Message Tom Lane 2003-01-20 15:22:01 Re: problems configuring with readline and zlib