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?
In response to
pgsql-novice by date
|Next:||From: paul butler||Date: 2003-03-13 14:49:21|
|Subject: Re: CHECK constraint|
|Previous:||From: Ben Clewett||Date: 2003-03-13 13:34:13|
|Subject: Version Number|