Re: [PATCH] Add XMLText function (SQL/XML X038)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Vik Fearing <vik(at)postgresfriends(dot)org>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add XMLText function (SQL/XML X038)
Date: 2023-08-27 04:40:55
Message-ID: CAFj8pRC=uaF3ZF2Wf29G1Thq2vu0=RFoELzWOP=GYn3YpCbtKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

so 26. 8. 2023 v 22:47 odesílatel Chapman Flack <chap(at)anastigmatix(dot)net>
napsal:

> On 2023-08-26 16:00, Pavel Stehule wrote:
> > Saxon can be an interesting library, but nobody knows if integration
> > with
> > Postgres is possible. Their C implementation is Java compiled/executed
> > by GraalV.
>
> Indeed, such an integration would probably not be in core.
>
> Of the two possible-ways-forward described on that wiki page, the one
> that didn't rely on the defunct XQC was one involving query rewriting.
> Have the parser understand the SQL/XML customized syntax, and define
> a set of ordinary functions it will be rewritten into. (This idea is
> bolstered somewhat by the fact that many things in SQL/XML, XMLTABLE
> for example, are /defined in the standard/ in terms of query rewriting
> into calls on simpler functions.)
>
> Then let there be an extension, or ideally someday a choice of
> extensions, supplying those functions.
>
> As to whether running Saxon in a Postgres extension is possible, that's
> been an example that ships with PL/Java since 1.5.1 five years ago.
>

The most simple "solution" can be the introduction of some new hooks there.
Then you can write an extension that will call PL/Java functions

>
> It's too bad the other projects have stalled; it's good to have more
> than one ready option. But Saxon shows no sign of going away.
>
> Perhaps the act of devising a standardized rewriting of queries
> onto a standardized set of loadable functions could be of interest
> to other DBMS projects as well. It's hard to imagine another DBMS
> not being in the same boat (if it isn't from a rich commercial firm
> that happens to have a modern XQuery implementation in-house).
>
> Maybe having that set of functions specified, with the prospect
> that more than one DBMS might be interested in a project
> implementing them, even inspires someone to go look at the
> xqilla or zorba repos to see how far they got, and pick up
> the baton, and then there could be more than one option.
>

Another possibility is revitalization of libxml2.

There was an extension http://www.explain.com.au/libx/ But the code is not
available to download too, but extending libxml2 is feasible.

I am not sure how valuable this work can be. Probably whoever really needs
it uses some Java based solution already.

Regards

Pavel

> Regards,
> -Chap
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-08-27 08:32:25 Re: Ignore 2PC transaction GIDs in query jumbling
Previous Message Rui Zhao 2023-08-27 04:32:02 Re: pg_upgrade fails with in-place tablespace