Re: Alter columntype with pgadmin?

From: Walter Haslbeck <wh(at)hillerzentri(dot)de>
To: pgadmin-support(at)postgresql(dot)org
Subject: Re: Alter columntype with pgadmin?
Date: 2005-05-27 12:10:42
Message-ID: 42970E42.9070501@hillerzentri.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

> If there is a suitable cast in the database, then the combo box will be
> populated with usable column types and made selectable (try it with
> varchar which should be castable). Any other conversion requires the use
> of the USING clause to the alter table statement which pgAdmin doesn't
> support. Also, from a quick scan of the code it appears that it won't

OK, I see that a conversion that needs a USING clause is hard to handle
with the GUI. But changing the size of a char doesn't need USING:

CREATE TABLE t1 ( c1 char(20) );
ALTER TABLE t1 ALTER column c1 TYPE char(30);
ALTER TABLE t1 ALTER column c1 TYPE char(10);

Its also possible (e.g.) to change from CHAR() to INT, (but not vice
versa) etc. without the USING clause. It would be great if I can do such
clear conversions with pgadminIII.

> let you try to change the types of columns referenced in foreign keys.

yes, of course, but perhaps you can implement a 'alter type cascade'
option. (OK, priority -999 :) )

Walter

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Ivan 2005-05-28 17:25:53 a few small bugs
Previous Message Dave Page 2005-05-27 11:49:20 Re: Alter columntype with pgadmin?