Thread: PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)
Re: Andrew Dunstan > Revert SQL/JSON features > > The reverts the following and makes some associated cleanups: -void +static void json_categorize_type(Oid typoid, JsonTypeCategory *tcategory, Oid *outfuncoid) This chunk broke PostGIS 3.3.0 compiled with 15beta3, when used with 15beta4: psql -Xc 'CREATE EXTENSION postgis' ERROR: could not load library "/usr/lib/postgresql/15/lib/postgis-3.so": /usr/lib/postgresql/15/lib/postgis-3.so: undefinedsymbol: json_categorize_type The PostGIS source has this comment: * The following code was all cut and pasted directly from * json.c from the Postgres source tree as of 2019-03-28. * It would be far better if these were exported from the * backend so we could just use them here. Maybe someday. * Sequel: 2022-04-04 That some day finally came in PG15 ... #if POSTGIS_PGSQL_VERSION < 170 static void json_categorize_type(Oid typoid, JsonTypeCategory *tcategory, Oid *outfuncoid) The "< 17" part was added on 2022-09-03, probably because of this breakage. Recompiling the (unmodified) 3.3.0 against 15beta4 seems to fix the problem. So, there is probably no issue here, but I suggest this "static" might be considered to be removed again so PostGIS can use it. Christoph
Re: PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)
From
Christoph Berg
Date:
Re: To Andrew Dunstan > The "< 17" part was added on 2022-09-03, probably because of this > breakage. > > Recompiling the (unmodified) 3.3.0 against 15beta4 seems to fix the > problem. Err sorry, my local build environment was still on beta3. PostGIS 3.3.0 is broken now with 15beta4: 10:52:29 lwgeom_out_geojson.c:54:35: error: unknown type name ‘JsonTypeCategory’ 10:52:29 54 | JsonTypeCategory tcategory, Oid outfuncoid, 10:52:29 | ^~~~~~~~~~~~~~~~ ... > So, there is probably no issue here, but I suggest this "static" might > be considered to be removed again so PostGIS can use it. I guess either PostgreSQL or PostGIS need to make a new release to fix that. Christoph
Re: [postgis-devel] PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)
From
Justin Pryzby
Date:
On Wed, Sep 07, 2022 at 11:07:35AM +0200, Christoph Berg wrote: > I guess either PostgreSQL or PostGIS need to make a new release to fix that. Postgis is already planning on it. https://lists.osgeo.org/pipermail/postgis-devel/2022-September/thread.html -- Justin
Re: [postgis-devel] PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)
From
Christoph Berg
Date:
Re: Justin Pryzby > > I guess either PostgreSQL or PostGIS need to make a new release to fix that. > > Postgis is already planning on it. > https://lists.osgeo.org/pipermail/postgis-devel/2022-September/thread.html Thanks. I was skimming the postgis-devel list, but did not read the subjects carefully enough to spot it. Christoph