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 1w8NFI-000TAd-2P for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 18:58:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8NFH-007exI-10 for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 18:58:23 +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 1w8NFG-007exA-3D for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 18:58:23 +0000 Received: from mail-yx1-xb130.google.com ([2607:f8b0:4864:20::b130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8NFF-00000000FN9-0S5q for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 18:58:23 +0000 Received: by mail-yx1-xb130.google.com with SMTP id 956f58d0204a3-64eee7b83cfso1056107d50.3 for ; Thu, 02 Apr 2026 11:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775156299; cv=none; d=google.com; s=arc-20240605; b=ea5i7nS+akF3L2eP3rPc3SNpZW5tu9E0E4X91dpq9X4I7KYqnXYnrJ6sx6VvwKF1iF qVoA7swOiJT6b3TfDGZH6Esl6xYR0fM2vxeI9RF/GTSO2IFGWTnDDBbhEszwpZF4Qsbw MlwRGOJskIarS0qdEetCT4ynrS+kzgSQYY6SSa421EMtzRtkv+E1EQJ623IKVjlmjYvq tHZImjIzpEollIZpREvC+qkRCIoIgByg5w/vA1Lxmk0epViOHKb8JX7vVjaserTu6Prf a33g73AE5HUchSHx/Ie6e1Y/vYVtwsyZ0Oc4KCLZAD9yqpRS87noQ74rS+szSNMGw9bp 20rg== 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=6xRh/dJ3hq6YjACMxNqfaCcEZUCw8V6c9L6nYBbu49g=; fh=lxf3x10NNODFoyS9+bID6kPvJJxc8IPNopDmXKuRcr8=; b=BKKaDgwJA8OodImWWUxEjSvkA/4T7M2kmqTP00+KW0M1bFvkCivYEyxFiV2eDvbq9A PNhuxrrTZrCckCM4I9UUDSxEEA7ki2z4gy8tAGGCvnSnKfdMnk41OrYkQL68t8WXvA// 9d0kUO9Qykw/U6cz8Z5DbJ0NFuYBJx++wDU+WW+WGVrrwGtlGhzpE0oqFbaDGuevsXAo 0AVM35KcrGbhWU16TzkHb7zC20YCa/UTsmaVQSzcjYDvhZ69M4IqThe7KxbF7t6ig0wh 3b6VwxXUJpIOVVBpxQDNIMQiRcwC8z8O/8p03v4lEZPCnF6GFBhwCEIes6u4RKlQqOKA xNGQ==; 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=1775156299; x=1775761099; 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=6xRh/dJ3hq6YjACMxNqfaCcEZUCw8V6c9L6nYBbu49g=; b=mL/l2Ecjs1oS+u5eyeNJje9w/eKSk8nP4rfaDr/ZTtGoTayaSWEK6okRyOW0lMygbw GJKlUWGwxAlwmOKnOCbEtpQPolPo4Ss0dby/saNsBR/zgUFYNTcvtPNr7NxJ1HrsS+S8 jQ+j/gPODUFzv53LLww0e2nAJrknGVeKW+rweKTVw8zpzY04JbsPYCSe9agU4YD6D48a YE4hBvkGio8YtOW32cvPUTYtYUCgP8VelABnhze1rccm4RlWXpg6u7Cu82WvW/mxq6jn Rb04+vjPu3tlCAPb4nGLrQ0Wqjsryl32F0wKgt9z5voIg1aP//ejnuTvf4EOFB02E5h3 uVfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775156299; x=1775761099; 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=6xRh/dJ3hq6YjACMxNqfaCcEZUCw8V6c9L6nYBbu49g=; b=FJVC2sLA0SrWOSpnupunRZJkmDsT1QFqojiFysyfBvmtvEsU3Yk1A+oQOBIcX8i7RO bzgoTCEybKbYyz7c24rwOwv6rHZkIoXx2vnGTDNvQlJtUzo4V3CBR+2XJCYu2UNQGT9d emEZ3mlqqH1iELruBjCJpOva7/a6NS7j/qcxgJmxGQ6LrVmG++vEShlllLPUidv45qv7 vQIa/EZnhEA3kQ11DEaKwVRDkajNeuMSlvte5rVzG4HWyn2N905Rwq7b1DnH3YGgyMGi glbHShZT/ik7g9tGcz1E6jsZcctvI5Y3Ykzaa9bFfyifGRA830V50/Nwr0o49goK37+t r7sw== X-Forwarded-Encrypted: i=1; AJvYcCXZK0sBR7jdEtRsjJAPMCWpawBMWy4z9kHaC1rw9XomqWowqRVwIuQBsUWQky2tMF6G9KBVTAp/GsXs1yaB@lists.postgresql.org X-Gm-Message-State: AOJu0YxIBZJXY+qyI+9ZWRZM7IlGuxomLWKgHf86aPuSEK2+9RA2jJIW S7vwJrt/K2rKGgIja8/bhiRUBcQH+cPFysTdV/clxJb32bOvZ5IKjDVg2hmtR6DbW3lUUfH7T8D ut+YF/1H/5SKziNnXhI4jcSziW4PVS10= X-Gm-Gg: AeBDievWHUtsRgOFnsnsVD5H19N5AVUO1yesH4hXt8NbyIiB+0MdMXKCendFLJfgOGm +GeRXiD+NzxXxF1yLSa0kmmro7zrKKzK/RPNcQqcAKzu3nr5Ag92BFlJzTjXbRLqa5pKyRppmsb xDwwhDLDLf8hvarfiv5r8i8cPYikkowVjK2XXKvzNFs7/q17yGeHrgyVHguYYEzkvgXhnASom59 2YWU9pF6cmNeirPxjbrlhpi/USeFRnzr7b2WXh5/5iNiT1+bHZqicEIvb90giwVqUmyncZ7jEdi 3TFIWe+U9Lmakim82Qk0PgI3OhacAOG/hnxIBHpeL75McE28upNgCPpxWbLuPpl95mfO8iYOFBq mRiu51tRe5fCgnhwHYHGpZ+9JE3zOrPkRyikhVi1Jy0abu61bZFoD7H2s5Q== X-Received: by 2002:a53:b54f:0:b0:64e:e82e:8421 with SMTP id 956f58d0204a3-650486c0490mr74108d50.13.1775156298212; Thu, 02 Apr 2026 11:58:18 -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: Thu, 2 Apr 2026 20:57:41 +0200 X-Gm-Features: AQROBzCHITtK98rUD6IWApd-2HncB3jT2H0Kht1SFRMmtWeZy3ILW3C5s9uy4O8 Message-ID: Subject: Re: WIP - xmlvalidate implementation from TODO list To: Marcos Magueta Cc: Jim Jones , Andrey Borodin , Kirill Reshke , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000936cbf064e7ec806" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000936cbf064e7ec806 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi =C4=8Dt 2. 4. 2026 v 20:22 odes=C3=ADlatel Marcos Magueta napsal: > Hey Jim and Pavel, thanks for demonstrating interest. > > > XML is a little bit outdated - but the proposed infrastructure can be > used for any documents, so it can theoretically supports json, jsonb too > [...]. I expect something like XMLVALIDATE will be JSON standard in a few > years. > > That doesn't sound like a bad idea to me. But I suspect I would need to > almost completely revamp the implementation in the patch so far, so I wou= ld > like to confirm a few things before committing to anything on that front. > It is usual when you design a feature that is not fully described by standard :-/. And then it is good to start primary from part (command), that is well described by standard. > > I am still unsure how the permissions would be managed properly with the > API approach. It seems to me we could rely on the ACL like before, but I > sense there's something more arcane around it when it comes to the > extension. > There are two different things - 1. possibility to registrate xml schema - you need just to CREATE right for related pg_namespace, 2. possibility to use xml schema - and you need to USAGE right - and this can be checked inside extension. Probably you cannot use all ACL related macros, and maybe you have to design some function instead of GRANT and REVOKE. Maybe some form of RLS can be used. When you separate storage of XML schemas to an extension, then you can implement just some minimalistic implementation (just what is necessary for regress tests) - and some more complex storage of XML schema can be designed (developed) outside the main branch. Hypothetical storage from contrib can be enhanced step by step. Regards Pavel > I didn't realize, but DB2 actually gives you decomposition over an xml > hierarchy into tables, which is an insanely valuable feature. I wonder ho= w > we could go with that here using the current catalog approach. > > Is there anything else that might be troublesome with changing approaches= ? > > Regards, Marcos. > --000000000000936cbf064e7ec806 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

=C4=8Dt 2. 4. 2026 v=C2=A020:= 22 odes=C3=ADlatel Marcos Magueta <maguetamarcos@gmail.com> napsal:
Hey Jim and Pavel,= thanks for demonstrating interest.

>=C2=A0XML is a little bit ou= tdated=C2=A0- but the proposed infrastructure=C2=A0can be used for any docu= ments, so it can theoretically supports json, jsonb too [...]. I expect som= ething like XMLVALIDATE will be JSON standard in a few years.

That d= oesn't sound like a bad idea to me. But I suspect I would need to almos= t completely revamp the implementation in the patch so far, so I would like= to confirm a few things before committing to anything on that front.

It is usual when you desig= n a feature that is not fully described by standard :-/. And then it is goo= d to start primary from part (command), that is well described by standard.=
=C2=A0

I am still unsure how the permissions wo= uld be managed properly with the API approach. It seems to me we could rely= on the ACL like before, but I sense there's something more arcane arou= nd it when it comes to the extension.

There are two different things - 1. possibility to registrate xml sc= hema - you need just to CREATE right for related pg_namespace, 2. possibili= ty to use xml schema - and you need to USAGE right - and this can be checke= d inside extension. Probably you cannot use all ACL related macros, and may= be you have to design some function instead of GRANT and REVOKE.=C2=A0 Mayb= e some form of RLS can be used. When you separate storage of XML schemas to= an extension, then you can implement just some minimalistic implementation= (just what is necessary for regress tests) - and some more complex storage= of XML schema can be designed (developed) outside the main branch. Hypothe= tical storage from contrib can be enhanced step by step.=C2=A0
Regards

Pavel



I didn't realize, but DB2 actually gives you decomposition= over an xml hierarchy into tables, which is an insanely valuable feature. = I wonder how we could go with that here using the current catalog approach.=

Is there anything else that might be troublesome with ch= anging approaches?

Regards, Marcos.
--000000000000936cbf064e7ec806--