Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Subselects in CHECK clause ...



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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group