Re: int4 to varchar length (pgadmin3) issue - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: int4 to varchar length (pgadmin3) issue
Date
Msg-id 20060831173656.55011.qmail@web31805.mail.mud.yahoo.com
Whole thread Raw
In response to int4 to varchar length (pgadmin3) issue  (<operationsengineer1@yahoo.com>)
Responses Re: int4 to varchar length (pgadmin3) issue  (<operationsengineer1@yahoo.com>)
Re: int4 to varchar length (pgadmin3) issue  (Andreas <maps.on@gmx.net>)
List pgsql-novice
> iow, i want to limit the the newly converted varchar
> revision to 2 characters, but can't due to the grayed
> out boxes in pgadmin3.

I saw this example at:
http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html

ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5);

This should do what you want.

Regards,

Richard Broersma Jr.

pgsql-novice by date:

Previous
From:
Date:
Subject: int4 to varchar length (pgadmin3) issue
Next
From:
Date:
Subject: Re: int4 to varchar length (pgadmin3) issue