From: | "Karl Stubsjoen" <karl(at)azprogolf(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Help changing varchar field |
Date: | 2002-10-17 15:22:45 |
Message-ID: | IBEMICFHMMPICFPMPBLCGEJJCJAA.karl@azprogolf.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm a postresql newbie, big time. I've been assigned the task of making
some simple changes to our dealer website. The PO Number field is the first
request, currently it excepts just 6 characters (do to the varchar(6) type).
Alvaro: how can this change be implemented? i can get to a postrgesql
command prompt.
Karl
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Alvaro Herrera
Munoz
Sent: Thursday, October 17, 2002 7:46 AM
To: Robert Treat
Cc: Karl Stubsjoen; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Help changing varchar field
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)
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2002-10-17 15:42:11 | Re: Help changing varchar field |
Previous Message | Jose Antonio Leo | 2002-10-17 15:18:56 | A table underneath another one |