Skip site navigation (1) Skip section navigation (2)

Re: int4 to varchar length (pgadmin3) issue

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: operationsengineer1(at)yahoo(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: int4 to varchar length (pgadmin3) issue
Date: 2006-08-31 17:36:56
Message-ID: 20060831173656.55011.qmail@web31805.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: 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.

In response to

Responses

pgsql-novice by date

Next:From: operationsengineer1Date: 2006-08-31 18:41:05
Subject: Re: int4 to varchar length (pgadmin3) issue
Previous:From: operationsengineer1Date: 2006-08-31 17:21:21
Subject: int4 to varchar length (pgadmin3) issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group