Re: Help changing varchar field
От | Karl Stubsjoen |
---|---|
Тема | Re: Help changing varchar field |
Дата | |
Msg-id | IBEMICFHMMPICFPMPBLCGEJJCJAA.karl@azprogolf.com обсуждение исходный текст |
Ответ на | Re: Help changing varchar field (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>) |
Ответы |
Re: Help changing varchar field
|
Список | 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@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Alvaro Herrera Munoz Sent: Thursday, October 17, 2002 7:46 AM To: Robert Treat Cc: Karl Stubsjoen; pgsql-general@postgresql.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[@]dcc.uchile.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@postgresql.org so that your message can get through to the mailing list cleanly
В списке pgsql-general по дате отправления: