Re: [GENERAL] subselects in check clauses

2001-06-04 Thread Stephan Szabo
On Mon, 4 Jun 2001, Rasmus Resen Amossen wrote: > I have a need to check if a certain condition holds for all rows that > matches a given criteria. But postgresql appearently doesn't support > subselects in check clauses. Here is an example: > > CREATE TABLE example (a int, b date, c date > CONS

[GENERAL] subselects in check clauses

2001-06-04 Thread Rasmus Resen Amossen
I have a need to check if a certain condition holds for all rows that matches a given criteria. But postgresql appearently doesn't support subselects in check clauses. Here is an example: CREATE TABLE example (a int, b date, c date CONSTRAINT csname CHECK (1 >= ALL (SELECT count(*)