Re: WIP - xmlvalidate implementation from TODO list - Mailing list pgsql-hackers

From Jim Jones
Subject Re: WIP - xmlvalidate implementation from TODO list
Date
Msg-id 70c72cb1-a39f-41b3-bfe3-e32ee7fda9c4@uni-muenster.de
Whole thread Raw
In response to Re: WIP - xmlvalidate implementation from TODO list  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: WIP - xmlvalidate implementation from TODO list
List pgsql-hackers
Hi!

On 04/01/2026 10:46, Andrey Borodin wrote:
> So you need to update src/test/regress/expected/xml_1.out for systems without libxml.

+1

There is also a xml_2.out. I don't really remember why it exists, but in
your case copying the changes from xml.out will most likely do the trick.

I am wondering whether passing the XML schema in every query is really
the right approach here. My main concern is that making the schema fully
user-controlled at execution time could lead to unwanted CPU or memory
usage -- not to mention the usability aspect of it. A catalog-level
schema registration mechanism would IMHO be a better fit, and it's also
supported by the SQL/XML standard:

"11.5 <XML valid according to clause>

Format

...
<XML valid according to identifier> ::= ID <registered XML schema name>
...

Syntax Rules

1) If <XML valid according to identifier> is specified, then the
<registered XML schema name> shall identify a registered XML schema RXS...
"

DB2 handles this similarly via REGISTER XMLSCHEMA.[1]

Thanks for working on this!

Best, Jim

[1] https://www.ibm.com/docs/en/db2/11.5.x?topic=commands-register-xmlschema




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: POC: make mxidoff 64 bits
Next
From: Tom Lane
Date:
Subject: Re: Error position support for ComputeIndexAttrs