Re: check (constraint) on point data type?

Поиск
Список
Период
Сортировка
Искать
От
Michael Glaesemann
Тема
Re: check (constraint) on point data type?
Дата
Msg-id
84E85B8A-B417-44F4-9406-F95DC5624E5E@seespotcode.net
Ответ на
Список
Дерево обсуждения
check (constraint) on point data type? "Jill" <jill289@hotmail.com>
Re: check (constraint) on point data type? "Jim Adams" <postgres@drakeenterprises.org>
Re: check (constraint) on point data type? Michael Glaesemann <grzm@seespotcode.net>
Re: check (constraint) on point data type? Jim Nasby <decibel@decibel.org>
Re: check (constraint) on point data type? Michael Glaesemann <grzm@seespotcode.net>

On Jul 25, 2007, at 0:47 , Jill wrote:

> Thank you so much guys - quick, detailed, and to the point. In fact  
> Michael understood right what I was trying to say (i.e., I need to  
> accept values between 0 and 1 and reject anything else) - but Jim's  
> suggestion is shorter (but Michael's is useful since now I know how  
> to write a struc for another problem I have).

Glad it helped. Do note that using the <@ operator is inclusive,  
i.e., (0,0) and (1,1) are included. The method using the  
strict_during helper is exclusive, so (0,0) and (1,1) are rejected.  
So the two constraints are slightly different. So make sure you use  
the one which works for your situation :)

Michael Glaesemann
grzm seespotcode net


В списке pgsql-novice по дате отправления
От: Jill
Дата:
От: Christian Leclerc
Дата:
FAQ