Converting varchar() to text

From: Steve Atkins <steve(at)blighty(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Converting varchar() to text
Date: 2004-09-15 16:29:13
Message-ID: 20040915162913.GA10752@gp.word-to-the-wise.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a safe way to convert varchar(n) to text, other than create
a new column, update, delete column, rename?

I have a number of databases that were built with varvhar(n) and which
should have been done with text. They're in production, and I'd rather
not take the downtime needed to convert some rather large tables - the
bulk update hitting every row of the large table makes it effectively
unvacuumable, and vacuum full requires locks that effectively shut
down the entire system.

They're the same format on disk, so I'm guessing that some diddling
with pg_attribute may be possible. Does anyone have any experience
doing this?

Cheers,
Steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Donald 2004-09-15 16:30:51 division by zero issue
Previous Message Bruno Wolff III 2004-09-15 16:13:59 Re: Auto increment/sequence on multiple columns?