Re: Help changing varchar field - Mailing list pgsql-general

From Alvaro Herrera Munoz
Subject Re: Help changing varchar field
Date
Msg-id 20021017144532.GB6800@dcc.uchile.cl
Whole thread Raw
In response to Re: Help changing varchar field  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: Help changing varchar field  ("Karl Stubsjoen" <karl@azprogolf.com>)
List 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[@]dcc.uchile.cl>)
"La espina, desde que nace, ya pincha" (Proverbio africano)

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Help changing varchar field
Next
From: "Jose Antonio Leo"
Date:
Subject: Re: RV: bad result in a query!! :-(