aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_coerce.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_coerce.c')
-rw-r--r--src/backend/parser/parse_coerce.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 094e99a8acf..e46b63f6d9f 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.129 2005/05/29 18:24:13 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.130 2005/05/30 01:20:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -168,8 +168,11 @@ coerce_type(ParseState *pstate, Node *node,
if (!con->constisnull)
{
- char *val = DatumGetCString(DirectFunctionCall1(unknownout,
- con->constvalue));
+ /*
+ * We assume here that UNKNOWN's internal representation is the
+ * same as CSTRING
+ */
+ char *val = DatumGetCString(con->constvalue);
/*
* We pass typmod -1 to the input routine, primarily because
@@ -183,7 +186,6 @@ coerce_type(ParseState *pstate, Node *node,
* ugly...
*/
newcon->constvalue = stringTypeDatum(targetType, val, -1);
- pfree(val);
}
result = (Node *) newcon;