Re: changing field length

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Jodi Kanter <jkanter(at)virginia(dot)edu>
Cc: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: changing field length
Date: 2003-08-19 19:33:00
Message-ID: 20030819122924.O72868-100000@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 19 Aug 2003, Jodi Kanter wrote:

> I am running 7.3.3. Can I change a field that is varying character(128)
> to varying character(250)?

You can either add a column, copy the data across and drop the old column
and use rename to give the new column the old name or if you're willing
to hack at system tables, you can change atttypmod in pg_attribute for the
column from 132 (maxsize + 4 to hold the real size) to 254.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Adi Alurkar 2003-08-19 22:05:28 pg_dump does not dump index, constraints, sequences
Previous Message Gaetano Mendola 2003-08-19 19:09:52 Re: changing field length