Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data

From: Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com>
To: "gryzman(at)gmail(dot)com" <gryzman(at)gmail(dot)com>
Cc: Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data
Date: 2011-11-30 17:30:14
Message-ID: 1322674209.22846.31.camel@raker2.ateb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2011-11-22 at 15:55 +0000, Gregg Jaskiewicz wrote:
> for the future it is better to just use text type, and: check
> length(field) < 35;

thanks to all for the respones.

The above seems a prudent way to go in my future.

My assumption is that converting varchar(n) to text would still force a
re-write of the table? i.e. currently there's no officially 'safe' way
to convert the field type w/o incurring a table re-write.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-11-30 18:05:53 Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data
Previous Message Rodrigo Gonzalez 2011-11-30 16:55:55 Re: Strange problem with turning WAL archiving on