mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user