Thread: Alter Column Wizard?

Alter Column Wizard?

From
Sven Köhler
Date:
Hi,

i mailed to the postgresql-general list in order to clearify, why there
is no full alter table/alter column command yet. One cannot change the
column-type of a column with one command. You need to create a new
column, copy data, delete the old one, recreate all constraints, indexes
etc.

This would be a beautiful feature for pgAdmin II/III.

It might be easy or not - depending on your program-structure. If you
can easily create one Object fr each Index/Constriant etc., it might be
easy to drop them, keep them saved in memory and recreate them - all
within a transaction if possible.

That one can't change column-definition is the most anoying thing about
postgresql, so it would be great to overcome that problem - even if it's
only with a tool like pgAdmin.

Thx
   Sven



Re: Alter Column Wizard?

From
"Dave Page"
Date:
Hi Sven,

> -----Original Message-----
> From: Sven Köhler [mailto:skoehler@upb.de]
> Sent: 16 June 2003 18:04
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Alter Column Wizard?
>
>
> Hi,
>
> i mailed to the postgresql-general list in order to clearify,
> why there
> is no full alter table/alter column command yet. One cannot
> change the
> column-type of a column with one command. You need to create a new
> column, copy data, delete the old one, recreate all
> constraints, indexes
> etc.
>
> This would be a beautiful feature for pgAdmin II/III.
>

We have looked at this problem a number of times in the past, and yes, it would be nice. Previously however, we had no
dependencymechanism, or drop column available to us which made the task significantly harder.  

I will have a think about how we might implement such a feature in pgAdmin III in the future.

Regards, Dave