*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.62 2001/10/03 05:29:12 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.63 2001/10/04 17:52:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
Oid oid_array[FUNC_MAX_ARGS];
/*
- * We assume that only typmod values greater than 0 indicate a forced
- * conversion is necessary.
+ * A negative typmod is assumed to mean that no coercion is wanted.
*/
- if ((atttypmod <= 0) || (atttypmod == exprTypmod(node)))
+ if (atttypmod < 0 || atttypmod == exprTypmod(node))
return node;
funcname = typeidTypeName(targetTypeId);
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.17 2001/10/03 18:32:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.18 2001/10/04 17:52:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
break;
case TIMEOID:
- if (with_typemod && typemod > 0)
+ if (with_typemod)
buf = psnprintf(50, "time(%d) without time zone",
typemod);
else
break;
case TIMETZOID:
- if (with_typemod && typemod > 0)
+ if (with_typemod)
buf = psnprintf(50, "time(%d) with time zone",
typemod);
else
break;
case TIMESTAMPOID:
- if (with_typemod && typemod > 0)
+ if (with_typemod)
buf = psnprintf(50, "timestamp(%d) without time zone",
typemod);
else
break;
case TIMESTAMPTZOID:
- if (with_typemod && typemod > 0)
+ if (with_typemod)
buf = psnprintf(50, "timestamp(%d) with time zone",
typemod);
else