Re: WIP - xmlvalidate implementation from TODO list

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Marcos Magueta <maguetamarcos(at)gmail(dot)com>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WIP - xmlvalidate implementation from TODO list
Date: 2026-01-04 19:05:01
Message-ID: 70c72cb1-a39f-41b3-bfe3-e32ee7fda9c4@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-01-04 19:20:31 Re: Error position support for ComputeIndexAttrs
Previous Message Heikki Linnakangas 2026-01-04 18:06:06 Re: POC: make mxidoff 64 bits