Re: Alter columntype with pgadmin?

Поиск
Список
Период
Сортировка
От Walter Haslbeck
Тема Re: Alter columntype with pgadmin?
Дата
Msg-id 42970E42.9070501@hillerzentri.de
обсуждение исходный текст
Ответ на Re: Alter columntype with pgadmin?  ("Dave Page" <dpage@vale-housing.co.uk>)
Список 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





В списке pgadmin-support по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Alter columntype with pgadmin?
Следующее
От: Ivan
Дата:
Сообщение: a few small bugs