From: James Robinson <jlrobins@socialserve.com>
To: pgsql-sql@postgresql.org
Subject: Subselects in CHECK clause ...
Date: Wed, 29 Nov 2006 12:08:12 -0500
Message-ID: <6881FC4D-8F7C-477B-9AAA-C9B5282D88B2@socialserve.com> (raw)
I see that subselects are not directly supported in check clauses,
but one can work around that by writing a stored function which
returns boolean and performs the subselect. Are there any known
gotchas with doing this?
The CREATE TABLE docs regarding CHECK clauses states:
"Currently, CHECK expressions cannot contain subqueries nor refer to
variables other than columns of the current row."
Is this due to someone not yet writing the necessary code to remove
the subquery clause, or is there a more fundamental reason?
----
James Robinson
Socialserve.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jlrobins@socialserve.com
Subject: Re: Subselects in CHECK clause ...
In-Reply-To: <6881FC4D-8F7C-477B-9AAA-C9B5282D88B2@socialserve.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox