pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: zengman <zengman@halodbtech.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Wienhold <ewie@ewie.name>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Regression with large XML data input
Date: Fri, 26 Dec 2025 14:28:53 +0800
Message-ID: <tencent_46A7A7C74F1494DD5A72CF5C@qq.com> (raw)
In-Reply-To: <1411819.1766685038@sss.pgh.pa.us>
References: <aIGknLuc8b8ega2X@paquier.xyz>
	<586b74bb-8941-420f-82c4-ba93e5b42b20@ewie.name>
	<tencent_2789D934383FA63637EFDB9E@qq.com>
	<89bbd852-eea9-42e8-bab6-bb8df59685de@ewie.name>
	<1411819.1766685038@sss.pgh.pa.us>

> usefulness [1].  I don't love doing that for xml.c, because it
> would put a permanent block on our seeing future deprecation
> issues (until they become outright build failures).  Still...

Under the current condition that the relevant code here is not modified, this might be an acceptable temporary solution.

> > But do we need the same guard for GCC here as well?
> 
> Yeah, we would.  Non-gcc-alike compilers are unlikely to accept that
> switch.  We would also need a fix for the meson build system.

Patch 0002 adds GCC checking. Additionally, I tested the meson build system and saw no warnings with the `-Dc_args="-Wall"` configuration.

```
meson setup .. --prefix=$PGHOME -Dc_args="-Wall"
postgres@zxm-VMware-Virtual-Platform:~/code/postgres/build$   meson compile -j8 
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -j 8
[2471/2471] Linking target src/interfaces/ecpg/test/thread/alloc
postgres@zxm-VMware-Virtual-Platform:~/code/postgres/build$ 
```

--
Regards,
Man Zeng
www.openhalo.org

Attachments:

  [application/octet-stream] 0002-Suppress-deprecation-warning-for-xmlKeepBlanksDefaul.patch (1.1K, ../tencent_46A7A7C74F1494DD5A72CF5C@qq.com/2-0002-Suppress-deprecation-warning-for-xmlKeepBlanksDefaul.patch)
  download | inline diff:
From 83e448e9e4d7623fb550c6ec6a3681a4ab2ff823 Mon Sep 17 00:00:00 2001
From: Man Zeng <zengman@halodbtech.com>
Date: Fri, 26 Dec 2025 10:21:18 +0800
Subject: [PATCH] Suppress deprecation warning for xmlKeepBlanksDefault() in 
 xml.c

xml.c uses libxml2's deprecated xmlKeepBlanksDefault()
before the relevant functions are removed, but for now silence the warnings.

Author: Man Zeng <zengman@halodbtech.com>
---
 src/backend/utils/adt/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/backend/utils/adt/Makefile b/src/backend/utils/adt/Makefile
index ba40ada11ca..7cc6b40914b 100644
--- a/src/backend/utils/adt/Makefile
+++ b/src/backend/utils/adt/Makefile
@@ -151,6 +151,12 @@ like.o: like.c like_match.c
 # Some code in numeric.c benefits from auto-vectorization
 numeric.o: CFLAGS += ${CFLAGS_VECTORIZE}
 
+# xml.c uses libxml2's deprecated xmlKeepBlanksDefault()
+# before the relevant functions are removed, but for now silence the warnings.
+ifeq ($(GCC), yes)
+xml.o: CFLAGS += -Wno-deprecated-declarations
+endif
+
 varlena.o: varlena.c levenshtein.c
 
 include $(top_srcdir)/src/backend/common.mk
-- 
2.45.2



view thread (36+ messages)  latest in thread

Message-ID: <tencent_46A7A7C74F1494DD5A72CF5C@qq.com>
Permalink:  ../tencent_46A7A7C74F1494DD5A72CF5C@qq.com/
Also on:    postgresql.org/message-id/tencent_46A7A7C74F1494DD5A72CF5C@qq.com

 ·  · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: zengman@halodbtech.com, tgl@sss.pgh.pa.us, ewie@ewie.name, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: Regression with large XML data input
  In-Reply-To: <tencent_46A7A7C74F1494DD5A72CF5C@qq.com>

* 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