[postgis-tickets] r17951 - Use get_call_result_type to retrieve tuple descriptions

Raul raul at rmr.ninja
Fri Oct 18 01:42:30 PDT 2019


Author: algunenano
Date: 2019-10-18 01:42:28 -0700 (Fri, 18 Oct 2019)
New Revision: 17951

Modified:
   trunk/postgis/lwgeom_dump.c
   trunk/postgis/lwgeom_geos.c
Log:
Use get_call_result_type to retrieve tuple descriptions

Closes #499
References #4549
References #4546



Modified: trunk/postgis/lwgeom_dump.c
===================================================================
--- trunk/postgis/lwgeom_dump.c	2019-10-18 02:18:50 UTC (rev 17950)
+++ trunk/postgis/lwgeom_dump.c	2019-10-18 08:42:28 UTC (rev 17951)
@@ -117,7 +117,8 @@
 		 * Build a tuple description for an
 		 * geometry_dump tuple
 		 */
-		tupdesc = RelationNameGetTupleDesc("geometry_dump");
+		get_call_result_type(fcinfo, 0, &tupdesc);
+		BlessTupleDesc(tupdesc);
 
 		/*
 		 * generate attribute metadata needed later to produce
@@ -255,7 +256,8 @@
 		 * Build a tuple description for an
 		 * geometry_dump tuple
 		 */
-		tupdesc = RelationNameGetTupleDesc("geometry_dump");
+		get_call_result_type(fcinfo, 0, &tupdesc);
+		BlessTupleDesc(tupdesc);
 
 		/*
 		 * generate attribute metadata needed later to produce

Modified: trunk/postgis/lwgeom_geos.c
===================================================================
--- trunk/postgis/lwgeom_geos.c	2019-10-18 02:18:50 UTC (rev 17950)
+++ trunk/postgis/lwgeom_geos.c	2019-10-18 08:42:28 UTC (rev 17951)
@@ -1530,12 +1530,8 @@
 	 * Build a tuple description for a
 	 * valid_detail tuple
 	 */
-	tupdesc = RelationNameGetTupleDesc("valid_detail");
-	if ( ! tupdesc )
-	{
-		lwpgerror("TYPE valid_detail not found");
-		PG_RETURN_NULL();
-	}
+	get_call_result_type(fcinfo, 0, &tupdesc);
+	BlessTupleDesc(tupdesc);
 
 	/*
 	 * generate attribute metadata needed later to produce



More information about the postgis-tickets mailing list