Search Postgresql Archives

Re: alter column to varchar without view drop/re-creation

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

 




Hello list,

May I know is there a way to "alter column type to varchar" (previous is varchar(***)) without view drop/re-creation?

Basically, looking for a way to change column without have to drop/re-create dependent views.

varchar(***) to varchar and no date/numeric changes.

I saw docs mention about: update pg_attribute. May I know:

. will dependent views updated automatically or there might be potential problems?
. If it's fine, will the following SQL enough to change column from varchar(***) to varchar?

  update pg_attribute set atttypmod =-1
  where  attrelid = 'oid' ;

Thanks a lot!

---
PostgreSQL 8.3.18 on x86_64



[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