Search Postgresql Archives

Converting char to varchar automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Database contains about 300 tables.
Most of them contain columns of char(n) type.
 
How to convert all those columns to varchar automatically ?
 
Is it possible to run some update commands in system tables for this ?
Or is it possible to create pgsql script which creates dynamically alter table alter column commands and PERFORMs them ?
 
Any tables have primary keys with char(n) columns and foreign keys on them. Foreign keys are deferrable and initially  immediate.
Will foreign keys allow to perform such alter table alter column commands ?
Or is there better way.
 
Andrus.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux