mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +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:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parse_coerce.h,v 1.44 2002/06/20 20:29:51 momjian Exp $
|
||||
* $Id: parse_coerce.h,v 1.45 2002/08/31 22:10:47 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -44,6 +44,8 @@ extern Node *coerce_type(ParseState *pstate, Node *node, Oid inputTypeId,
|
||||
Oid targetTypeId, int32 atttypmod, bool isExplicit);
|
||||
extern Node *coerce_type_typmod(ParseState *pstate, Node *node,
|
||||
Oid targetTypeId, int32 atttypmod);
|
||||
extern Node *coerce_type_constraints(ParseState *pstate, Node *arg,
|
||||
Oid typeId, bool applyTypmod);
|
||||
|
||||
extern Node *coerce_to_boolean(Node *node, const char *constructName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user