Re: Deprecation warnings on Rocky 10.2 with current dev branch
Re: Deprecation warnings on Rocky 10.2 with current dev branch
От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 17 Jul 2026, at 14:47, Daniel Westermann (DWE) wrote: > [1086/2136] Compiling C object src/backend/postgres_lib.a.p/utils_adt_xml.c.o > ../postgresql/src/backend/utils/adt/xml.c: In function ‘xml_parse’: > ../postgresql/src/backend/utils/adt/xml.c:1924:25: warning: ‘xmlKeepBlanksDefault’ is deprecated [-Wdeprecated-declarations] > 1924 | save_keep_blanks = xmlKeepBlanksDefault(preserve_whitespace ? 1 : 0); > | ^~~~~~~~~~~~~~~~ > In file included from ../postgresql/src/backend/utils/adt/xml.c:51: Which version of libxml2 do you have installed? -- Daniel Gustafsson
Re: Deprecation warnings on Rocky 10.2 with current dev branch
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Daniel Westermann (DWE)" writes: > I've just noticed this while building from the dev branch on Rocky 10.2 x64: > ../postgresql/src/backend/utils/adt/xml.c:1961:17: warning: xmlKeepBlanksDefault is deprecated [-Wdeprecated-declarations] > 1961 | xmlKeepBlanksDefault(save_keep_blanks); > | ^~~~~~~~~~~~~~~~~~~~ > Is this known already? Yeah. It's annoying as heck, because they deprecated that without providing an adequate replacement. The replacement is claimed to be "Use the modern options API with XML_PARSE_NOBLANKS", but there is no direct equivalent to xmlParseBalancedChunkMemory that takes an options argument. So to get rid of this, we're looking at a probably-nontrivial rewrite of xml_parse(), with possibly some user-visible behavioral changes, and who-knows-what effects for compatibility across different libxml2 versions. If you feel like researching that, have at it. regards, tom lane
Re: Deprecation warnings on Rocky 10.2 with current dev branch
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andrew Dunstan writes: > On 2026-07-17 Fr 10:38 AM, Tom Lane wrote: >> Yeah. It's annoying as heck, because they deprecated that without >> providing an adequate replacement. The replacement is claimed to >> be "Use the modern options API with XML_PARSE_NOBLANKS", but there >> is no direct equivalent to xmlParseBalancedChunkMemory that takes >> an options argument. > I think we can probably use xmlParseInNodeContext(), which does take an > options argument. Did you look at that? Hmm ... I think I was confused by the fact that it takes "const char *data" not "const xmlChar *string". On further research, those are more equivalent than I'd thought. So maybe it'll work. regards, tom lane
Re: Deprecation warnings on Rocky 10.2 with current dev branch
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
On 2026-07-17 Fr 10:38 AM, Tom Lane wrote: > "Daniel Westermann (DWE)" writes: >> I've just noticed this while building from the dev branch on Rocky 10.2 x64: >> ../postgresql/src/backend/utils/adt/xml.c:1961:17: warning: xmlKeepBlanksDefault is deprecated [-Wdeprecated-declarations] >> 1961 | xmlKeepBlanksDefault(save_keep_blanks); >> | ^~~~~~~~~~~~~~~~~~~~ >> Is this known already? > Yeah. It's annoying as heck, because they deprecated that without > providing an adequate replacement. The replacement is claimed to > be "Use the modern options API with XML_PARSE_NOBLANKS", but there > is no direct equivalent to xmlParseBalancedChunkMemory that takes > an options argument. > > So to get rid of this, we're looking at a probably-nontrivial > rewrite of xml_parse(), with possibly some user-visible behavioral > changes, and who-knows-what effects for compatibility across > different libxml2 versions. > > If you feel like researching that, have at it. > I think we can probably use xmlParseInNodeContext(), which does take an options argument. Did you look at that? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
Deprecation warnings on Rocky 10.2 with current dev branch
От:
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>
Дата:
Hi,
I've just noticed this while building from the dev branch on Rocky 10.2 x64:
[1086/2136] Compiling C object src/backend/postgres_lib.a.p/utils_adt_xml.c.o
../postgresql/src/backend/utils/adt/xml.c: In function ‘xml_parse’:
../postgresql/src/backend/utils/adt/xml.c:1924:25: warning: ‘xmlKeepBlanksDefault’ is deprecated [-Wdeprecated-declarations]
1924 | save_keep_blanks = xmlKeepBlanksDefault(preserve_whitespace ? 1 : 0);
| ^~~~~~~~~~~~~~~~
In file included from ../postgresql/src/backend/utils/adt/xml.c:51:
/usr/include/libxml2/libxml/parser.h:957:17: note: declared here
957 | xmlKeepBlanksDefault (int val);
| ^~~~~~~~~~~~~~~~~~~~
../postgresql/src/backend/utils/adt/xml.c:1948:25: warning: ‘xmlKeepBlanksDefault’ is deprecated [-Wdeprecated-declarations]
1948 | xmlKeepBlanksDefault(save_keep_blanks);
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/libxml2/libxml/parser.h:957:17: note: declared here
957 | xmlKeepBlanksDefault (int val);
| ^~~~~~~~~~~~~~~~~~~~
../postgresql/src/backend/utils/adt/xml.c:1961:17: warning: ‘xmlKeepBlanksDefault’ is deprecated [-Wdeprecated-declarations]
1961 | xmlKeepBlanksDefault(save_keep_blanks);
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/libxml2/libxml/parser.h:957:17: note: declared here
957 | xmlKeepBlanksDefault (int val);
| ^~~~~~~~~~~~~~~~~~~~
Is this known already?
Regards
Daniel
Re: Deprecation warnings on Rocky 10.2 with current dev branch
От:
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>
Дата:
>> On 17 Jul 2026, at 14:47, Daniel Westermann (DWE) wrote: >> [1086/2136] Compiling C object src/backend/postgres_lib.a.p/utils_adt_xml.c.o >> ../postgresql/src/backend/utils/adt/xml.c: In function ‘xml_parse’: >> ../postgresql/src/backend/utils/adt/xml.c:1924:25: warning: ‘xmlKeepBlanksDefault’ is deprecated [-Wdeprecated-declarations] >> 1924 | save_keep_blanks = xmlKeepBlanksDefault(preserve_whitespace ? 1 : 0); >> | ^~~~~~~~~~~~~~~~ >> In file included from ../postgresql/src/backend/utils/adt/xml.c:51: >Which version of libxml2 do you have installed? The standard on Rocky 10: postgres@rocky10-pgbox:/home/postgres/ [pg20] rpm -qa | grep libxml2 libxml2-2.12.5-10.el10_2.2.x86_64 libxml2-devel-2.12.5-10.el10_2.2.x86_64 Regards Daniel