Re: check (constraint) on point data type?

From: Michael Glaesemann
Subject: Re: check (constraint) on point data type?
Date: ,
Msg-id: F19890E1-0639-48AD-A3B6-366BCF79DA69@seespotcode.net
(view: Whole thread, Raw)
In response to: Re: check (constraint) on point data type?  (Jim Nasby)
List: pgsql-novice

Tree view

check (constraint) on point data type?  ("Jill", )
 Re: check (constraint) on point data type?  ("Jim Adams", )
 Re: check (constraint) on point data type?  (Michael Glaesemann, )
  Re: check (constraint) on point data type?  (Jim Nasby, )
   Re: check (constraint) on point data type?  (Michael Glaesemann, )
 Re: check (constraint) on point data type?  ("Jill", )
  Re: check (constraint) on point data type?  (Michael Glaesemann, )

[Please don't top post as it makes the discussion more difficult to
follow.]

On Jul 24, 2007, at 16:10 , Jim Nasby wrote:

> What's wrong with (NOT location <@ box '((0,0),(1,1))') ?

Two reasons I didn't provide that answer:

1)

On Jul 24, 2007, at 2:06 PM, Michael Glaesemann wrote:

> I haven't looked at the geometric functions closely enough to see
> if you could use some of those rather than defining your own
> helper, but this should work.

2) I misread the specs and assumed that 0 and 1 values for x and y
were to be rejected. I suspected that the geometric functions were
inclusive rather than exclusive, which, upon experimentation, was
correct. Right answer to the wrong specs :)

# select not '(0,0)'::point <@ '((0,0),(1,1))'::box;
?column?
----------
f
(1 row)

Michael Glaesemann
grzm seespotcode net




pgsql-novice by date:

From: Michael Glaesemann
Date:
Subject: Re: check (constraint) on point data type?
From: "Jill"
Date:
Subject: Re: check (constraint) on point data type?