pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org, PostGIS Development Discussion <postgis-devel@lists.osgeo.org>
Subject: PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)
Date: Wed, 7 Sep 2022 11:01:22 +0200
Message-ID: <Yxhd4gw1xJP+SsDe@msg.df7cb.de> (raw)
In-Reply-To: <E1oTrV9-000zTH-C0@gemulon.postgresql.org>
References: <E1oTrV9-000zTH-C0@gemulon.postgresql.org>

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: undefined symbol: 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





view thread (4+ messages)  latest in thread

Message-ID: <Yxhd4gw1xJP+SsDe@msg.df7cb.de>
Permalink:  ../Yxhd4gw1xJP+SsDe@msg.df7cb.de/
Also on:    postgresql.org/message-id/Yxhd4gw1xJP+SsDe@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: myon@debian.org, andrew@dunslane.net, postgis-devel@lists.osgeo.org
  Subject: Re: PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)
  In-Reply-To: <Yxhd4gw1xJP+SsDe@msg.df7cb.de>
  References: <E1oTrV9-000zTH-C0@gemulon.postgresql.org> <Yxhd4gw1xJP+SsDe@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox