Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVqw7-0002t3-4n for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Sep 2022 09:01:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVqw5-0000Qc-TG for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Sep 2022 09:01:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVqw5-0000QT-KG for pgsql-hackers@lists.postgresql.org; Wed, 07 Sep 2022 09:01:29 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVqvz-0006sE-H3 for pgsql-hackers@lists.postgresql.org; Wed, 07 Sep 2022 09:01:29 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4MMx7k3t7Rz3Dyp; Wed, 7 Sep 2022 11:01:22 +0200 (CEST) Date: Wed, 7 Sep 2022 11:01:22 +0200 From: Christoph Berg To: Andrew Dunstan Cc: pgsql-hackers@lists.postgresql.org, PostGIS Development Discussion Subject: PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features) Message-ID: Mail-Followup-To: Christoph Berg , Andrew Dunstan , pgsql-hackers@lists.postgresql.org, PostGIS Development Discussion References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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