Re: int4 to varchar length (pgadmin3) issue

Поиск
Список
Период
Сортировка
От
Тема Re: int4 to varchar length (pgadmin3) issue
Дата
Msg-id 20060831184106.86238.qmail@web33311.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: int4 to varchar length (pgadmin3) issue  (Richard Broersma Jr <rabroersma@yahoo.com>)
Ответы Re: int4 to varchar length (pgadmin3) issue  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список 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.
>

Richard, thank you.  i think this does what i want,
however, i want to understand a bit more.

this is an additional defined constraint, correct?  is
this constraint added automagically by pgadmin when
you  enter a length value or is this a different
method to achieve a similar result?

tia..

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

В списке pgsql-novice по дате отправления:

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: int4 to varchar length (pgadmin3) issue
Следующее
От:
Дата:
Сообщение: hyperlinks stored in pgsql