From 853153ca6dfdf2bdf6ce800216de75b2fefbb4f1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 6 Dec 2002 03:28:34 +0000 Subject: ALTER DOMAIN .. SET / DROP NOT NULL ALTER DOMAIN .. SET / DROP DEFAULT ALTER DOMAIN .. ADD / DROP CONSTRAINT New files: - doc/src/sgml/ref/alter_domain.sgml Rod Taylor --- src/backend/parser/parse_expr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/backend/parser/parse_expr.c') diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index b620c7116bc..834cc9c82de 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.132 2002/11/30 21:25:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.133 2002/12/06 03:28:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -629,6 +629,14 @@ transformExpr(ParseState *pstate, Node *expr, ConstraintTestValue *domVal) case T_DomainConstraintValue: { + /* + * If domVal is NULL, we are not translating an expression that + * can use it + */ + if (domVal == NULL) + elog(ERROR, "VALUE is not allowed in expression for node %d", + nodeTag(expr)); + result = (Node *) copyObject(domVal); break; -- cgit v1.2.3