Changing column data type on an existing table

From: Joe Audette <joe_audette(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Changing column data type on an existing table
Date: 2005-05-13 17:34:34
Message-ID: 20050513173434.84137.qmail@web30714.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

joe_audette [at] yahoo dotcom
http://www.joeaudette.com
http://www.mojoportal.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brad Nicholson 2005-05-13 18:00:49 Re: Changing column data type on an existing table
Previous Message Darren Houston 2005-05-13 17:33:18 Re: Problem - PostgreSQL Truncating Column Names to 63 Characters