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

Re: check (constraint) on point data type?

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Jill <jill289(at)hotmail(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: check (constraint) on point data type?
Date: 2007-07-25 06:00:14
Message-ID: 84E85B8A-B417-44F4-9406-F95DC5624E5E@seespotcode.net (view raw or flat)
Thread:
Lists: pgsql-novice
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



In response to

pgsql-novice by date

Next:From: Christian LeclercDate: 2007-07-25 10:48:17
Subject: Re: How to optimize insert statements ?
Previous:From: JillDate: 2007-07-25 05:47:34
Subject: Re: check (constraint) on point data type?

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