[postgis-tickets] r16918 - Fix support for PostgreSQL-12 ("getrelid" macro removed)
Sandro Santilli
strk at kbt.io
Wed Oct 17 07:25:46 PDT 2018
Author: strk
Date: 2018-10-17 07:25:46 -0700 (Wed, 17 Oct 2018)
New Revision: 16918
Modified:
branches/2.5/NEWS
branches/2.5/postgis/gserialized_estimate.c
Log:
Fix support for PostgreSQL-12 ("getrelid" macro removed)
The call is replaced with its expansion which should work
as back as PostgreSQL-9.1 which is before the oldest version
PostGIS-2.2 (our oldest maintained branch) supports.
This is then safe to backport to all branches till 2.2.
Patch by Laurenz Albe
References #4306 in 2.5 branch
Modified: branches/2.5/NEWS
===================================================================
--- branches/2.5/NEWS 2018-10-17 14:23:59 UTC (rev 16917)
+++ branches/2.5/NEWS 2018-10-17 14:25:46 UTC (rev 16918)
@@ -7,6 +7,7 @@
- #4189, Fix undefined behaviour in SADFWrite (Raúl Marín)
- #4191, Fix undefined behaviour in ptarray_clone_deep (Raúl Marín)
- #4020, Fix leftovers in topology upgrade from 2.1 (Sandro Santilli)
+ - #4206, Fix support for PostgreSQL 12 dev branch (Laurenz Albe)
PostGIS 2.5.0
Modified: branches/2.5/postgis/gserialized_estimate.c
===================================================================
--- branches/2.5/postgis/gserialized_estimate.c 2018-10-17 14:23:59 UTC (rev 16917)
+++ branches/2.5/postgis/gserialized_estimate.c 2018-10-17 14:25:46 UTC (rev 16918)
@@ -1304,8 +1304,8 @@
}
/* What are the Oids of our tables/relations? */
- relid1 = getrelid(var1->varno, root->parse->rtable);
- relid2 = getrelid(var2->varno, root->parse->rtable);
+ relid1 = rt_fetch(var1->varno, root->parse->rtable)->relid;
+ relid2 = rt_fetch(var2->varno, root->parse->rtable)->relid;
POSTGIS_DEBUGF(3, "using relations \"%s\" Oid(%d), \"%s\" Oid(%d)",
get_rel_name(relid1) ? get_rel_name(relid1) : "NULL", relid1, get_rel_name(relid2) ? get_rel_name(relid2) : "NULL", relid2);
More information about the postgis-tickets
mailing list