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.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 73cd89fd3d8..2a5a7698d85 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.111 2002/03/21 16:01:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.112 2002/03/29 19:06:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1103,7 +1103,7 @@ parser_typecast_constant(Value *expr, TypeName *typename)
bool string_palloced = false;
bool isNull = false;
- tp = typenameType(TypeNameToInternalName(typename));
+ tp = typenameType(typename);
switch (nodeTag(expr))
{
@@ -1161,7 +1161,7 @@ parser_typecast_expression(ParseState *pstate,
Oid inputType = exprType(expr);
Oid targetType;
- targetType = typenameTypeId(TypeNameToInternalName(typename));
+ targetType = typenameTypeId(typename);
if (inputType == InvalidOid)
return expr; /* do nothing if NULL input */
@@ -1185,27 +1185,3 @@ parser_typecast_expression(ParseState *pstate,
return expr;
}
-
-/*
- * Given a TypeName node as returned by the grammar, generate the internal
- * name of the corresponding type. Note this does NOT check if the type
- * exists or not.
- */
-char *
-TypeNameToInternalName(TypeName *typename)
-{
- Assert(typename->attrname == NULL);
- if (typename->arrayBounds != NIL)
- {
- /*
- * By convention, the name of an array type is the name of its
- * element type with "_" prepended.
- */
- char *arrayname = palloc(strlen(typename->name) + 2);
-
- sprintf(arrayname, "_%s", typename->name);
- return arrayname;
- }
- else
- return typename->name;
-}