Search Postgresql Archives

Re: Quick way to alter a column type?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 8, 2008 at 8:09 PM, Ow Mun Heng <Ow.Mun.Heng@xxxxxxx> wrote:
> It was varchar(4) for a _long_ time until there came a need recently to
> move it to a 5 characters.
> Hence the issue, I've already changed it to varchar() instead to make it
> more open (and less problematic in the future)


To prevent this issue from re-occuring  in the future, you could use
text and then add a check( length( col ) <= 5 ).

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux