diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-03 21:15:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-03 21:15:45 +0000 |
commit | 3752e85bad45e98383ea1c9e7e7dbaf13f41da7e (patch) | |
tree | ce6735a837cf169d82744b7877630494d35ce65a /src/backend/nodes/readfuncs.c | |
parent | 464598b637cfabde01695a27a32ed8f133d127d7 (diff) | |
download | postgresql-3752e85bad45e98383ea1c9e7e7dbaf13f41da7e.tar.gz postgresql-3752e85bad45e98383ea1c9e7e7dbaf13f41da7e.zip |
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.
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r-- | src/backend/nodes/readfuncs.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 457e04eb9f6..fe4831ee9f6 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.146 2003/01/10 21:08:11 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.147 2003/02/03 21:15:44 tgl Exp $ * * NOTES * Path and Plan nodes do not have any readfuncs support, because we @@ -635,29 +635,28 @@ _readBooleanTest(void) } /* - * _readConstraintTest + * _readCoerceToDomain */ -static ConstraintTest * -_readConstraintTest(void) +static CoerceToDomain * +_readCoerceToDomain(void) { - READ_LOCALS(ConstraintTest); + READ_LOCALS(CoerceToDomain); READ_NODE_FIELD(arg); - READ_ENUM_FIELD(testtype, ConstraintTestType); - READ_STRING_FIELD(name); - READ_STRING_FIELD(domname); - READ_NODE_FIELD(check_expr); + READ_OID_FIELD(resulttype); + READ_INT_FIELD(resulttypmod); + READ_ENUM_FIELD(coercionformat, CoercionForm); READ_DONE(); } /* - * _readConstraintTestValue + * _readCoerceToDomainValue */ -static ConstraintTestValue * -_readConstraintTestValue(void) +static CoerceToDomainValue * +_readCoerceToDomainValue(void) { - READ_LOCALS(ConstraintTestValue); + READ_LOCALS(CoerceToDomainValue); READ_OID_FIELD(typeId); READ_INT_FIELD(typeMod); @@ -900,10 +899,10 @@ parseNodeString(void) return_value = _readNullTest(); else if (MATCH("BOOLEANTEST", 11)) return_value = _readBooleanTest(); - else if (MATCH("CONSTRAINTTEST", 14)) - return_value = _readConstraintTest(); - else if (MATCH("CONSTRAINTTESTVALUE", 19)) - return_value = _readConstraintTestValue(); + else if (MATCH("COERCETODOMAIN", 14)) + return_value = _readCoerceToDomain(); + else if (MATCH("COERCETODOMAINVALUE", 19)) + return_value = _readCoerceToDomainValue(); else if (MATCH("TARGETENTRY", 11)) return_value = _readTargetEntry(); else if (MATCH("RANGETBLREF", 11)) |