From b0422b215c100bb29c1071872012a1f3c6681058 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 12 Dec 2002 20:35:16 +0000 Subject: Preliminary code review for domain CHECK constraints patch: add documentation, make VALUE a non-reserved word again, use less invasive method of passing ConstraintTestValue into transformExpr, fix problems with nested constraint testing, do correct thing with NULL result from a constraint expression, remove memory leak. Domain checks still need much more work if we are going to allow ALTER DOMAIN, however. --- doc/src/sgml/ref/create_domain.sgml | 23 +++++++++++++++++++++-- doc/src/sgml/release.sgml | 3 ++- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml index 488f86811c7..0d44434b3e5 100644 --- a/doc/src/sgml/ref/create_domain.sgml +++ b/doc/src/sgml/ref/create_domain.sgml @@ -1,5 +1,5 @@ @@ -30,7 +30,7 @@ CREATE DOMAIN domainname [AS] constraint is: [ CONSTRAINT constraint_name ] -{ NOT NULL | NULL } +{ NOT NULL | NULL | CHECK (expression) } @@ -128,6 +128,25 @@ where constraint is: + + CHECK (expression) + + + CHECK clauses specify integrity constraints or tests + which values of the domain must satisfy. + Each constraint must be an expression + producing a Boolean result. It should use the name VALUE + to refer to the value being tested. + + + + Currently, CHECK expressions cannot contain + subselects nor refer to variables other than VALUE. + + + + + diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index b43db923e21..ce54952e02a 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,5 +1,5 @@ @@ -24,6 +24,7 @@ CDATA means the content is "SGML-free", so you can write without worries about funny characters. --> -- cgit v1.2.3