1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

Determine the set of constraints applied to a domain at executor

startup, not in the parser; this allows ALTER DOMAIN to work correctly
with domain constraint operations stored in rules.  Rod Taylor;
code review by Tom Lane.
This commit is contained in:
Tom Lane
2003-02-03 21:15:45 +00:00
parent 464598b637
commit 3752e85bad
24 changed files with 524 additions and 339 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.141 2003/01/13 00:18:51 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.142 2003/02/03 21:15:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -674,8 +674,8 @@ transformExpr(ParseState *pstate, Node *expr)
case T_ArrayRef:
case T_FieldSelect:
case T_RelabelType:
case T_ConstraintTest:
case T_ConstraintTestValue:
case T_CoerceToDomain:
case T_CoerceToDomainValue:
{
result = (Node *) expr;
break;
@ -1017,11 +1017,11 @@ exprType(Node *expr)
case T_BooleanTest:
type = BOOLOID;
break;
case T_ConstraintTest:
type = exprType((Node *) ((ConstraintTest *) expr)->arg);
case T_CoerceToDomain:
type = ((CoerceToDomain *) expr)->resulttype;
break;
case T_ConstraintTestValue:
type = ((ConstraintTestValue *) expr)->typeId;
case T_CoerceToDomainValue:
type = ((CoerceToDomainValue *) expr)->typeId;
break;
case T_RangeVar:
/*
@ -1117,10 +1117,10 @@ exprTypmod(Node *expr)
return typmod;
}
break;
case T_ConstraintTest:
return exprTypmod((Node *) ((ConstraintTest *) expr)->arg);
case T_ConstraintTestValue:
return ((ConstraintTestValue *) expr)->typeMod;
case T_CoerceToDomain:
return ((CoerceToDomain *) expr)->resulttypmod;
case T_CoerceToDomainValue:
return ((CoerceToDomainValue *) expr)->typeMod;
default:
break;
}