88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.94 2003/04/08 23:20:02 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.95 2003/04/10 02:47:46 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -219,20 +219,6 @@ coerce_type(Node *node, Oid inputTypeId, Oid targetTypeId,
219219if (targetTypeId != baseTypeId )
220220result = coerce_to_domain (result ,baseTypeId ,targetTypeId ,
221221cformat );
222-
223- /*
224- * If the input is a constant, apply the type conversion
225- * function now instead of delaying to runtime. (We could, of
226- * course, just leave this to be done during
227- * planning/optimization; but it's a very frequent special
228- * case, and we save cycles in the rewriter if we fold the
229- * expression now.)
230- *
231- * Note that no folding will occur if the conversion function is
232- * not marked 'immutable'.
233- */
234- if (IsA (node ,Const ))
235- result = eval_const_expressions (result );
236222}
237223else
238224{
@@ -464,7 +450,6 @@ coerce_type_typmod(Node *node, Oid targetTypeId, int32 targetTypMod,
464450{
465451List * args ;
466452Const * cons ;
467- Node * fcall ;
468453
469454/* Pass given value, plus target typmod as an int4 constant */
470455cons = makeConst (INT4OID ,
@@ -487,18 +472,7 @@ coerce_type_typmod(Node *node, Oid targetTypeId, int32 targetTypMod,
487472args = lappend (args ,cons );
488473}
489474
490- fcall = build_func_call (funcId ,targetTypeId ,args ,cformat );
491-
492- /*
493- * If the input is a constant, apply the length coercion
494- * function now instead of delaying to runtime.
495- *
496- * See the comments for the similar case in coerce_type.
497- */
498- if (node && IsA (node ,Const ))
499- node = eval_const_expressions (fcall );
500- else
501- node = fcall ;
475+ node = build_func_call (funcId ,targetTypeId ,args ,cformat );
502476}
503477
504478return node ;