Re: Changing the type of a column in an already populated - Mailing list pgsql-general

From Medi Montaseri
Subject Re: Changing the type of a column in an already populated
Date
Msg-id 3DDFCD23.8040102@intransa.com
Whole thread Raw
In response to Changing the type of a column in an already populated database.  (David Pradier <dpradier@apartia.fr>)
List pgsql-general
I wonder if there are any intentions of supporting this feature via
alter table.
That woud be so useful...
If I'm not mistaking.....Informix supports that....anyone know if Oracle
or sybase support this...

FYI, I'm talking about

create table test ( id serial, name text) ;
alter table test alter name varchar(20);

In phase one PG will just do the job....hopefully you the user know what
you are doing.
in phase two PG can run a check to see if any integrity or constraint
will  yield invalid or
ambiguous, fix if you can, error out if you can'nt.


Brian Minton wrote:

> David Pradier wrote:
>
>> Hi!
>>
>> I'd like to know if it is possible to change the type of a column to a
>> compatible one, in an already populated database.
>> For example, changing a column from varchar(20) to varchar(25) ?
>> I'm using postgresql 7.3rc1
>>
>> Thanks for your help.
>>
>> Best regards,
>> David
>
>
> dump the database, edit the dump file, and reload.  of course, this is
> annonying on live data, but it works
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly





pgsql-general by date:

Previous
From: Medi Montaseri
Date:
Subject: Re: Dumb Newbie Question - Mandrake 9.0 / PGSQL 7.2
Next
From: Aleksei Wolff
Date:
Subject: GUI for Postgres Management? PostgreSQL vs MySQL.