CHECK constraint

From: Ben Clewett <B(dot)Clewett(at)roadrunner(dot)uk(dot)com>
To:
Cc: pgsql-novice(at)postgresql(dot)org
Subject: CHECK constraint
Date: 2003-03-13 14:35:40
Message-ID: 3E70973C.9080708@roadrunner.uk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message paul butler 2003-03-13 14:49:21 Re: CHECK constraint
Previous Message Ben Clewett 2003-03-13 13:34:13 Version Number