Re: altering column length
От | Alberto Caso |
---|---|
Тема | Re: altering column length |
Дата | |
Msg-id | 1041182615.6921.23.camel@portege1 обсуждение исходный текст |
Ответ на | altering column length ("Reshat Sabiq" <sabiq@purdue.edu>) |
Ответы |
innodb
|
Список | pgsql-novice |
El dom, 29-12-2002 a las 14:35, Reshat Sabiq escribió: > I believe it is not possible yet in postreSQL, but in case it is what > would be the equivalent of the following Oracle statement (assuming > current myfield size to be 10 bytes (of type char)): > ALTER TABLE mytable MODIFY (myfield CHAR(12)); > > If it's currently not supported is there a way to submit an RFE? It's not supported. You can instead create a new table with the field already as you want it to be, and transfer data, as explained in [1]. Another possible way, if you are using PostgreSQL 7.3, it already supports dropping columns so you can create a new column myfield_temp as char(12), copy values from myfield, drop myfield and rename myfield_temp to myfield. You should keep in mind that default and NOT NULL are not supported in ADD COLUMN and you should use SET DEFAULT or SET NOT NULL aftewards as required. [1] http://techdocs.postgresql.org/techdocs/updatingcolumns.php Regards, -- Alberto Caso Palomino Adaptia Soluciones Integrales http://www.adaptia.net alberto.caso@adaptia.net
В списке pgsql-novice по дате отправления: