Re: alter column witdh - Mailing list pgsql-sql

From Christoph Haller
Subject Re: alter column witdh
Date
Msg-id 3ED37F1F.3060209@rodos.fzk.de
Whole thread Raw
In response to alter column witdh  ("Eric Anderson Vianet SAO" <eric@vianet-express.com.br>)
List pgsql-sql
 >> how can I alter the column width>
Something like

begin ;

alter table foo rename column b to b_old ;
alter table foo add column b_new character(20) ;
update foo set b_new = b_old ;
alter table foo drop column b_old ;
alter table foo rename column b_new to b ;

commit ;

does the trick. Refer to the archives too.

Regards, Christoph




pgsql-sql by date:

Previous
From: Thomas Good
Date:
Subject: Re: [Fwd: SQL book]
Next
From: "Eric Anderson Vianet SAO"
Date:
Subject: Re: discover a toast table name