From 971175fa0c63befed59b4809ce8bf0a40a8a00cc Mon Sep 17 00:00:00 2001
From: "Vadim B. Mikheev" <vadim4o@yahoo.com>
Date: Fri, 27 Nov 1998 20:09:56 +0000
Subject: [PATCH] New HeapTuple structure/interface.

---
 contrib/fulltextindex/fti.c  |  2 +-
 src/pl/plpgsql/src/pl_comp.c | 16 ++++++++--------
 src/pl/tcl/pltcl.c           |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/contrib/fulltextindex/fti.c b/contrib/fulltextindex/fti.c
index 8d14f8f55c9..33a7666fe77 100644
--- a/contrib/fulltextindex/fti.c
+++ b/contrib/fulltextindex/fti.c
@@ -154,7 +154,7 @@ fti()
 	tupdesc = rel->rd_att;	/* what the tuple looks like (?) */
 
 	/* get oid of current tuple, needed by all, so place here */
-	oid = rettuple->t_oid;
+	oid = rettuple->t_data->t_oid;
 	if (!OidIsValid(oid))
 	    elog(ERROR,"Full Text Indexing: oid of current tuple is NULL");
 
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index f982471fd09..a5a29878af1 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -3,7 +3,7 @@
  *			  procedural language
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.3 1998/09/01 04:40:20 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.4 1998/11/27 20:07:22 vadim Exp $
  *
  *	  This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -620,7 +620,7 @@ plpgsql_parse_word(char *word)
 		typ = (PLpgSQL_type *) malloc(sizeof(PLpgSQL_type));
 
 		typ->typname = strdup(nameout(&(typeStruct->typname)));
-		typ->typoid = typeTup->t_oid;
+		typ->typoid = typeTup->t_data->t_oid;
 		fmgr_info(typeStruct->typinput, &(typ->typinput));
 		typ->typbyval = typeStruct->typbyval;
 		typ->atttypmod = -1;
@@ -943,7 +943,7 @@ plpgsql_parse_wordtype(char *word)
 		typ = (PLpgSQL_type *) malloc(sizeof(PLpgSQL_type));
 
 		typ->typname = strdup(nameout(&(typeStruct->typname)));
-		typ->typoid = typeTup->t_oid;
+		typ->typoid = typeTup->t_data->t_oid;
 		fmgr_info(typeStruct->typinput, &(typ->typinput));
 		typ->typbyval = typeStruct->typbyval;
 		typ->atttypmod = -1;
@@ -1060,7 +1060,7 @@ plpgsql_parse_dblwordtype(char *string)
 	 * ----------
 	 */
 	attrtup = SearchSysCacheTuple(ATTNAME,
-								  ObjectIdGetDatum(classtup->t_oid),
+								  ObjectIdGetDatum(classtup->t_data->t_oid),
 								  PointerGetDatum(word2), 0, 0);
 	if (!HeapTupleIsValid(attrtup))
 	{
@@ -1087,7 +1087,7 @@ plpgsql_parse_dblwordtype(char *string)
 	typ = (PLpgSQL_type *) malloc(sizeof(PLpgSQL_type));
 
 	typ->typname = strdup(nameout(&(typeStruct->typname)));
-	typ->typoid = typetup->t_oid;
+	typ->typoid = typetup->t_data->t_oid;
 	fmgr_info(typeStruct->typinput, &(typ->typinput));
 	typ->typbyval = typeStruct->typbyval;
 	typ->atttypmod = attrStruct->atttypmod;
@@ -1163,7 +1163,7 @@ plpgsql_parse_wordrowtype(char *string)
 
 	row->dtype = PLPGSQL_DTYPE_ROW;
 	row->nfields = classStruct->relnatts;
-	row->rowtypeclass = typetup->t_oid;
+	row->rowtypeclass = typetup->t_data->t_oid;
 	row->fieldnames = malloc(sizeof(char *) * row->nfields);
 	row->varnos = malloc(sizeof(int) * row->nfields);
 
@@ -1174,7 +1174,7 @@ plpgsql_parse_wordrowtype(char *string)
 		 * ----------
 		 */
 		attrtup = SearchSysCacheTuple(ATTNUM,
-									  ObjectIdGetDatum(classtup->t_oid),
+									  ObjectIdGetDatum(classtup->t_data->t_oid),
 									  (Datum) (i + 1), 0, 0);
 		if (!HeapTupleIsValid(attrtup))
 		{
@@ -1215,7 +1215,7 @@ plpgsql_parse_wordrowtype(char *string)
 		strcat(var->refname, cp);
 		var->datatype = malloc(sizeof(PLpgSQL_type));
 		var->datatype->typname = strdup(nameout(&(typeStruct->typname)));
-		var->datatype->typoid = typetup->t_oid;
+		var->datatype->typoid = typetup->t_data->t_oid;
 		fmgr_info(typeStruct->typinput, &(var->datatype->typinput));
 		var->datatype->typbyval = typeStruct->typbyval;
 		var->datatype->atttypmod = attrStruct->atttypmod;
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 3ce921b0378..c97e17558a5 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -3,7 +3,7 @@
  *			  procedural language (PL)
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.7 1998/10/09 16:57:10 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.8 1998/11/27 20:05:27 vadim Exp $
  *
  *	  This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -1613,7 +1613,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
 									  0, 0, 0);
 		if (!HeapTupleIsValid(typeTup))
 			elog(ERROR, "pltcl: Cache lookup of type %s failed", args[i]);
-		qdesc->argtypes[i] = typeTup->t_oid;
+		qdesc->argtypes[i] = typeTup->t_data->t_oid;
 		fmgr_info(((Form_pg_type) GETSTRUCT(typeTup))->typinput,
 				  &(qdesc->arginfuncs[i]));
 		qdesc->argtypelems[i] = ((Form_pg_type) GETSTRUCT(typeTup))->typelem;
-- 
GitLab