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?
I support 3 different dbs in my app, Postgre is the newest and least familiar to me but I am trying to learn.
Any help much appreciated.
Joe Audette
In v8 at least, you can issue: alter TABLE <tablename> ALTER <column_name> TYPE text;
-- _______________________________
This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. _______________________________
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq