Re: Help changing varchar field

From: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Karl Stubsjoen <karl(at)azprogolf(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help changing varchar field
Date: 2002-10-17 14:45:32
Message-ID: 20021017144532.GB6800@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 17, 2002 at 10:33:52AM -0400, Robert Treat wrote:
> AFAIK there's no easy way to do this. Essentially you'll need to create
> a new field of varchar(15), copy the contents of varchar(6), drop
> varchar(6), then rename varchar(15). I'd recommend doing it all in one
> transaction.

You can also set atttypmod to 15+4 (right now it should be 6+4) to the
attribute in pg_attribute.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"La espina, desde que nace, ya pincha" (Proverbio africano)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jose Antonio Leo 2002-10-17 14:56:31 Re: RV: bad result in a query!! :-(
Previous Message Robert Treat 2002-10-17 14:33:52 Re: Help changing varchar field