aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 3fd3370672f..2efdd136005 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.69 2000/02/20 21:32:10 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.70 2000/02/21 18:47:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -726,23 +726,19 @@ parser_typecast_constant(Value *expr, TypeName *typename)
switch (nodeTag(expr))
{
- case T_String:
- const_string = DatumGetPointer(expr->val.str);
- break;
case T_Integer:
string_palloced = true;
const_string = int4out(expr->val.ival);
break;
case T_Float:
- string_palloced = true;
- const_string = float8out(&expr->val.dval);
+ case T_String:
+ const_string = expr->val.str;
break;
case T_Null:
isNull = true;
break;
default:
- elog(ERROR,
- "Cannot cast this expression to type '%s'",
+ elog(ERROR, "Cannot cast this expression to type '%s'",
typename->name);
}