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
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(*)