Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7qfr-005ks8-24 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 08:11:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7qfq-00G2Fh-0A for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 08:11:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7qfp-00G2FY-2K for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 08:11:38 +0000 Received: from mail-yx1-xb12c.google.com ([2607:f8b0:4864:20::b12c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7qfn-00000002JpH-0DWr for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 08:11:37 +0000 Received: by mail-yx1-xb12c.google.com with SMTP id 956f58d0204a3-64937edbc9eso8510176d50.2 for ; Wed, 01 Apr 2026 01:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775031093; cv=none; d=google.com; s=arc-20240605; b=MwQTqxAlSiZeavzvsxFu34RlkG2THXiQmNwjhzz2v/KFuUelNpXWebr32Potj9gvYn j04+PjIhlO3p2sOB9XIymPlY1TjkRzACBBR/6S87i2aGxjEWZfsvIjhl9Au9pq9JD88B rYzl2kYV0NZoXqIb3IkIvY94derTD0SBvFnz2jDnvAkVkt9YzuvjrYenMev7Ov1KqpYS r2/2WKoMUG6glnu+rWPg4KJKGYBiYAjO+tjoKD2cVZSYIFAeEZMXINlaEfthrXD+yJY/ Olk/SZ309lnpO8HIxDgVOvpuq0uxsq05LES2iBQ142AcYDPWZGfp5Hv40pCA6RBPGc+d F7LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=yb6qmMqn60rAlieRJvaHRIQTYFJAL5g3EX5VTL0A/3k=; fh=yWHjTXamikp8/IfBU2Uqi98PyyNuejbIk/GeVOw5d0Y=; b=i56R346/Tph0UsIx/PNHk37F3E4KaXGj2zeucf5d4aKDCUBeV+qhbOZwdpD4zGwi/m sN+290YJ9Ak+EAYOmjn65MNMXDAX+sfh8Ejy/rLa9/7/3PMqzVA+T3Pxl7Eu883p/gjn 29Jhpd7I4KV8O1VgHbq266gK5B8tZUFx7+csdbwHRG5OYQLT4Kd4YA1q65iJmhtU8LNQ zgqHUcT0LQJdaj0ZUyGFwUjdNvSUtI6nrSIF0MiDqg30Lkzw76BBFHNI9ZL4yJJuvDO5 jDqG+ydPYlZFpMPjyEFmPVaDYOjMsViwdXAihl11p0TKQ70peEDd6MMRwuJnpIAn5s1/ IYbQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775031093; x=1775635893; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yb6qmMqn60rAlieRJvaHRIQTYFJAL5g3EX5VTL0A/3k=; b=Za3ch9sq846r18OfpEC66oZxC8AygMnD9ZysjmSs3io2k2zbcE9sb2Ph37mU7vVK43 MEKJYLzPDr/lEQmgz27LRhl5lztUD5thuYrrxpJ01BP0/ZEMT2GuUSLqYiGMj2yrNLDz FlVBzcpblEVBiNtvGdMv+5oPuSNKptlvteWu+x2XENEIsBbGf8qa6OB/+8XVCrre+8cy H6UfAo9/PjC+eCVNpmU0zGOQW70gEz4jUNtzv/dMfLVIetcVlMrOFDKQ69f4pUlTVaE9 GFxxc3o1quRDf/xGpdncip/u14qkEfK2neOmIFRA6hlghCKy0jZx855zLh8+n4j5DSkq pkjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775031093; x=1775635893; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yb6qmMqn60rAlieRJvaHRIQTYFJAL5g3EX5VTL0A/3k=; b=QmjbE+WKPTdigkJ5S2Za0zHoDWmhndhdcI9CUjRiy5rkadIeAlhDVZiD1MMGBWy/tn 6Z9yUtFfm7j2bZRE/uPJhvXUP3ZZ3PaQwiSOTUoR/qBHF2FKhPWajgKupXavlIZsJe9i AjeJ/u8V6mb98EYfflGIZ/wAcqwDbZlgrf1J1HYXO7QmQpO4QBIt1LvbwKN5aP8cOCez 4mxat5tZPsU8gAQQsl10lIqbJDnYs8LFcNzJ+onY17yAgzP8aQOAcbVZ+ZEmtm5HUFmz 4IHV067ErfbhT62vBErooHqyBGueNT1VHBTeks63iFrPXFzeqZNQGbAJ4D+fwpVyOnGF Lwbw== X-Forwarded-Encrypted: i=1; AJvYcCXWlZRW2SjweGymFsuJ2DvdrbCu13XPOyV7bDyEFW0XW2ER2aHGFjyLgNU/HTjCn7GWEJvYCZqEG7aiumaL@lists.postgresql.org X-Gm-Message-State: AOJu0YzMi3VNoms2B/5JIdIjLsGyYXd3O/1jempMHZFF8XfSDyk6L84R v6JDfdcCXh4WGBFBb68LCxaTjVn8DB4dD9XVfN/dI+BtpKyek3xwVfqE9ou54TAdQ6yw9qSEk4O rUfX3eAhZ8MaktsNzJGSdPo3XlxQvDNA= X-Gm-Gg: ATEYQzycuE8e8i359Y2KUVbm1WuLqN6OtG3NFySUscB5cjwj1h8Ih8IWT27SGPcr0m6 c2XRRhhNKf6GNnrR2+eeFxt+9aB/tFex0JHft7Sff/1iYshvCaQ1MvanKi69mE+RoW92blJ11A9 1I7l5Qx65gC0XGgGUK+RAEMvjBiwq5su9q50GZTAFFipO2uM8QWslDnp1HWG6+aLFIDyltNJY6z 5iggNlh7X/Re653lITIbSjbDNhsPrHE2DcU7iSXnI2cG89/9EBIsi6Ln91mnHPF6CV4L4Q2EcI/ jPUjx2QQXnRnKWb7IQejcKggNjiHTCPsblX0rZcTu2ntQMV7cMeodeQP8QnOHgnkMkHEOCSbfL/ MV2NlSuvkzQFdf+xA5tZyC4rC7JriXiJlVhoLBPl6Rv8rzA4TQci/Zz7w0g== X-Received: by 2002:a05:690e:1687:b0:650:3064:4cf2 with SMTP id 956f58d0204a3-65030645293mr2371221d50.5.1775031092963; Wed, 01 Apr 2026 01:11:32 -0700 (PDT) MIME-Version: 1.0 References: <2ba05acc-6392-42a4-b59e-61df086b2d4d@uni-muenster.de> <1d49e214-93bc-4928-945c-27e60251a6ad@uni-muenster.de> <9228b6dc-cfae-4a11-927a-209680f5507e@uni-muenster.de> <2f8ca841-0956-4e7d-8fa2-038b879c8f4d@uni-muenster.de> In-Reply-To: From: Pavel Stehule Date: Wed, 1 Apr 2026 10:10:56 +0200 X-Gm-Features: AQROBzDQrmTcfczsh85raOd_HPyA7SsG8DO168XTFxLnAUOKDd9l_PFu7aeUDOE Message-ID: Subject: Re: WIP - xmlvalidate implementation from TODO list To: Jim Jones Cc: Marcos Magueta , Andrey Borodin , Kirill Reshke , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000c2ec3e064e61a1ac" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c2ec3e064e61a1ac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable st 1. 4. 2026 v 9:47 odes=C3=ADlatel Jim Jones napsal: > > > On 31/03/2026 12:57, Pavel Stehule wrote: > > I found https://www.developpez.net/forums/d540201/bases-donnees/db2/ > > validation-xml-db2-v9-5-a/ > bases-donnees/db2/validation-xml-db2-v9-5-a/> > > Interesting. In DB2 it looks indeed more like a schema composition. > Perhaps something to consider once the current approach is ready. > It should be considered from the beginning - it means that the relational identifier is not unique. It can complicate upgrades. And it can complicate possible ports from db2. maybe it can be implemented just as an extension - we don't need DDL commands CREATE XMLSCHEMA - there can be some function. If I understand correctly, the SQL/XML knows just XMLVALIDATE command - and in the first step - this can be just a function too. Theoretically there can be different access - we can introduce a generic XMLVALIDATE command, that can call some callback. This callback can be implemented in an extension. One extension can XML storage identified by relation identifier, another can implement some shared storage on the disc outside the database etc. So the organization of the patch can be different 1. creating API for extensions for implementing loading the schema from some sources. 2. implementation XMLVALIDATE that uses this API 3. creating an extension in contrib, that implements XML storage identified by relational API. Because we don't have an extensible parser, the XMLVALIDATE command should be in core, but other parts are not. XML is a little bit outdated - but the proposed infrastructure can be used for any documents, so it can theoretically supports json, jsonb too, and this can helps with accepting XMLVALIDATE to core. I expect something like XMLVALIDATE will be JSON standard in a few years. Regards Pavel > Best, Jim > > --000000000000c2ec3e064e61a1ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


st 1. 4. 2026 v= =C2=A09:47 odes=C3=ADlatel Jim Jones <jim.jones@uni-muenster.de> napsal:


On 31/03/2026 12:57, Pavel Stehule wrote:
> I found https://www.developpez.net/= forums/d540201/bases-donnees/db2/
> validation-xml-db2-v9-5-a/ <https://www.developpez= .net/forums/d540201/
> bases-donnees/db2/validation-xml-db2-v9-5-a/>

Interesting. In DB2 it looks indeed more like a schema composition.
Perhaps something to consider once the current approach is ready.

It should be considered from the beginning - it = means that the relational identifier is not unique.=C2=A0 It can complicate= upgrades. And it can complicate possible ports from db2.

maybe it can be implemented just as an extension - we don't nee= d DDL commands CREATE XMLSCHEMA - there can be some function. If I understa= nd correctly, the SQL/XML knows just XMLVALIDATE command - and in the first= step - this can be just a function too.=C2=A0

The= oretically there can be different access - we can introduce a generic XMLVA= LIDATE command, that can call some callback. This callback can be implement= ed in an extension. One extension can XML storage identified by relation id= entifier, another can implement some shared storage on the disc outside the= database etc. So the organization of the patch can be different=C2=A0

1. creating API for extensions for implementing loadin= g the schema from some sources.
2. implementation XMLVALIDATE tha= t uses this API
3. creating an extension in contrib, that impleme= nts XML storage identified by relational API.

Beca= use we don't have an extensible parser, the XMLVALIDATE command should = be in core, but other parts are not.

XML is a litt= le bit outdated=C2=A0- but the proposed infrastructure=C2=A0can be used for= any documents, so it can theoretically supports json, jsonb too, and this = can helps with accepting XMLVALIDATE to core. I expect something like XMLVA= LIDATE will be JSON standard in a few years.

Regar= ds

Pavel


Best, Jim

--000000000000c2ec3e064e61a1ac--