From aabdd3094c17d7fc2e4a75361c6702f0bf976075 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Mon, 20 Jul 1998 11:17:11 +0000
Subject: [PATCH] Remove un-needed references to Name.

---
 src/backend/parser/gram.c       |  2 +-
 src/backend/parser/parse_func.c | 22 ++++++++--------------
 src/backend/parser/parse_node.c |  6 +++---
 src/backend/parser/parse_type.c |  4 ++--
 4 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/src/backend/parser/gram.c b/src/backend/parser/gram.c
index 670e052257f..df0eb6b7da1 100644
--- a/src/backend/parser/gram.c
+++ b/src/backend/parser/gram.c
@@ -218,7 +218,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.17 1998/07/19 05:49:18 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.18 1998/07/20 11:17:10 momjian Exp $
  *
  * HISTORY
  *	  AUTHOR			DATE			MAJOR EVENT
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 7da19487439..3dd80a28d01 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.21 1998/07/12 21:29:19 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.22 1998/07/20 11:17:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1286,7 +1286,6 @@ ParseComplexProjection(ParseState *pstate,
 {
 	Oid			argtype;
 	Oid			argrelid;
-	Name		relname;
 	Relation	rd;
 	Oid			relid;
 	int			attnum;
@@ -1317,7 +1316,6 @@ ParseComplexProjection(ParseState *pstate,
 					if (RelationIsValid(rd))
 					{
 						relid = RelationGetRelationId(rd);
-						relname = RelationGetRelationName(rd);
 						heap_close(rd);
 					}
 					if (RelationIsValid(rd))
@@ -1376,7 +1374,6 @@ ParseComplexProjection(ParseState *pstate,
 					if (RelationIsValid(rd))
 					{
 						relid = RelationGetRelationId(rd);
-						relname = RelationGetRelationName(rd);
 						heap_close(rd);
 					}
 					if (RelationIsValid(rd))
@@ -1414,17 +1411,14 @@ ParseComplexProjection(ParseState *pstate,
 				if (RelationIsValid(rd))
 				{
 					relid = RelationGetRelationId(rd);
-					relname = RelationGetRelationName(rd);
 					heap_close(rd);
-				}
-				if (RelationIsValid(rd) &&
-					(attnum = get_attnum(relid, funcname))
-					!= InvalidAttrNumber)
-				{
-
-					param->paramtype = attnumTypeId(rd, attnum);
-					param->param_tlist = setup_tlist(funcname, relid);
-					return ((Node *) param);
+					if ((attnum = get_attnum(relid, funcname))
+						!= InvalidAttrNumber)
+					{
+						param->paramtype = attnumTypeId(rd, attnum);
+						param->param_tlist = setup_tlist(funcname, relid);
+						return ((Node *) param);
+					}
 				}
 				break;
 			}
diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c
index dd7e18e910b..7c9f6940d68 100644
--- a/src/backend/parser/parse_node.c
+++ b/src/backend/parser/parse_node.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.17 1998/07/12 21:29:20 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.18 1998/07/20 11:17:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -280,7 +280,7 @@ make_array_ref(Node *expr,
 
 	if (type_struct_array->typelem == InvalidOid)
 		elog(ERROR, "make_array_ref: type %s is not an array",
-			 (Name) &(type_struct_array->typname.data[0]));
+			 type_struct_array->typname);
 
 	/* get the type tuple for the element type */
 	type_tuple = SearchSysCacheTuple(TYPOID,
@@ -362,7 +362,7 @@ make_array_set(Expr *target_expr,
 
 	if (type_struct_array->typelem == InvalidOid)
 		elog(ERROR, "make_array_ref: type %s is not an array",
-			 (Name) &(type_struct_array->typname.data[0]));
+			 type_struct_array->typname);
 	/* get the type tuple for the element type */
 	type_tuple = SearchSysCacheTuple(TYPOID,
 							ObjectIdGetDatum(type_struct_array->typelem),
diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c
index ea6a4a096b9..6daf38db87e 100644
--- a/src/backend/parser/parse_type.c
+++ b/src/backend/parser/parse_type.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.12 1998/07/12 21:29:21 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.13 1998/07/20 11:17:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -234,7 +234,7 @@ GetArrayElementType(Oid typearray)
 	if (type_struct_array->typelem == InvalidOid)
 	{
 		elog(ERROR, "GetArrayElementType: type %s is not an array",
-			 (Name) &(type_struct_array->typname.data[0]));
+			 type_struct_array->typname);
 	}
 
 	return (type_struct_array->typelem);
-- 
GitLab