CHECK constraint - Mailing list pgsql-novice

From Ben Clewett
Subject CHECK constraint
Date
Msg-id 3E70973C.9080708@roadrunner.uk.com
Whole thread Raw
In response to Version Number  (Ben Clewett <B.Clewett@roadrunner.uk.com>)
Responses Re: CHECK constraint
List pgsql-novice
In SQL standards, I belive a SELECT query is valid in a check constraint:

CREATE TABLE foo (
    a INT CHECK ( a IN ( SELECT b FROM bar WHERE .... ) )
}

However, this seems not to be the case (yet) in PostgreSQL.

Should I do this with Triggers instead?  Are there any other elegent
methods of doing the same?

Ben


pgsql-novice by date:

Previous
From: Ben Clewett
Date:
Subject: Version Number
Next
From: "paul butler"
Date:
Subject: Re: CHECK constraint