Search Postgresql Archives

Re: Changing column data type on an existing table

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

 



Joe Audette wrote:
Hi,

I have an app that I released with a particular field
as varchar 255.

Can someone give me a script example I can use to make
an upgrade script to change it to text or at least to
larger varchar without losing existing data?

Others have answered for version 8.

If you are running one of the 7.x releases, you should google for "pg_attribute atttypmod" and see how you can change that value to extend varchars.

HTH

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[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