Skip site navigation (1) Skip section navigation (2)

Increasing the length of a VARCHAR column without table rewrite

From: "Eric Comeau" <ecomeau(at)signiant(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Increasing the length of a VARCHAR column without table rewrite
Date: 2009-10-22 18:29:47
Message-ID: hbq8aq$jor$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-admin
ALTER TABLE .... ALTER column TYPE varchar(xxx)

We need to increase the length of a varchar(256) column in two of our 
largest tables preferrably to TEXT.

Is there a way to do this without having to go through a complete table 
rewrite?

I have googled and seen the todo on the wiki, but I'm wondering if we are 
increasing the length of a varchar column can we manually modify the system 
catalogs to increase the length?

http://wiki.postgresql.org/wiki/Todo#ALTER


Version: PG 8.1.17

Thanks,
Eric
 



Responses

pgsql-admin by date

Next:From: Yaroslav TykhiyDate: 2009-10-22 22:35:57
Subject: Re: Reversing flow of WAL shipping
Previous:From: Greg StarkDate: 2009-10-22 18:20:09
Subject: Re: Fwd: Reversing flow of WAL shipping

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group