aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-31 22:10:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-31 22:10:48 +0000
commit845a6c3acccea0ec34e70808787aa7d431b0d96d (patch)
treec6e162146378dc6cdb62793d3b30674b6d64d465 /src/backend/utils/adt/ruleutils.c
parent1440acd703e04f39340f7fb3a432b028a791e038 (diff)
downloadpostgresql-845a6c3acccea0ec34e70808787aa7d431b0d96d.tar.gz
postgresql-845a6c3acccea0ec34e70808787aa7d431b0d96d.zip
Code review for domain-constraints patch. Use a new ConstraintTest node
type for runtime constraint checks, instead of misusing the parse-time Constraint node for the purpose. Fix some damage introduced into type coercion logic; in particular ensure that a coerced expression tree will read out the correct result type when inspected (patch had broken some RelabelType cases). Enforce domain NOT NULL constraints against columns that are omitted from an INSERT.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r--src/backend/utils/adt/ruleutils.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 458ab68749d..c7da14ad7ea 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -3,7 +3,7 @@
* back to source text
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.119 2002/08/29 01:19:41 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.120 2002/08/31 22:10:46 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -2187,6 +2187,18 @@ get_rule_expr(Node *node, deparse_context *context)
}
break;
+ case T_ConstraintTest:
+ {
+ ConstraintTest *ctest = (ConstraintTest *) node;
+
+ /*
+ * We assume that the operations of the constraint node
+ * need not be explicitly represented in the output.
+ */
+ get_rule_expr(ctest->arg, context);
+ }
+ break;
+
case T_SubLink:
get_sublink_expr(node, context);
break;