Re: How to modify type in table?

Поиск
Список
Период
Сортировка
От Albert REINER
Тема Re: How to modify type in table?
Дата
Msg-id 20010205183919.B1866@frithjof
обсуждение исходный текст
Ответ на How to modify type in table?  ("Jaruwan Laongmal" <jaruwan@gits.net.th>)
Список pgsql-sql
Saluton,

On Tue, Jan 30, 2001 at 10:22:23AM +0700, Jaruwan Laongmal wrote:
> Dear Sir.
> Would you like to inform me how to modify type in table?
> For example , I define type as varchar(14) , but I want to modify to varchar(120). How to do this.

If it is not too much data, the easiest would be to use pg_dump to
dump the database (or just the table), edit the definition, and feed
the changed file to psql in order to get the data back. Or you can
create a different table with the correct structure, copy the data
there, drop the old table, rename the new one to the correct one.

Albert.


-- 

--------------------------------------------------------------------------
Albert Reiner                                   <areiner@tph.tuwien.ac.at>
Deutsch       *       English       *       Esperanto       *       Latine
--------------------------------------------------------------------------


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

Предыдущее
От: Poet/Joshua Drake
Дата:
Сообщение: Postgres-HOWTO
Следующее
От: Brice Ruth
Дата:
Сообщение: SQL Join - MySQL/PostgreSQL difference?