Re: PostgreSQL vs SQL/XML Standards

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL vs SQL/XML Standards
Date: 2019-01-20 05:26:12
Message-ID: CAFj8pRCKwDGqP55RTykDq87DXuXStE+3Qy2Hf9Wxh_A-cUnwTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ne 20. 1. 2019 v 6:06 odesílatel Chapman Flack <chap(at)anastigmatix(dot)net>
napsal:

> On 01/19/19 23:49, Pavel Stehule wrote:
>
> > If I remember, described functionality was implemented in early patches,
> > but was removed to simplify code. To now, there was not a request to do
> it.
> >
> > Unfortunately, the documentation was not fixed.
>
> I'll do that, as I'm working in there anyway. :)
>
> > column expressions are evaluated once per row, but XPath expression is
> > compiled per row too, if I remember well.
>
> I looked for evidence of that in the code, but did not find it; the
> compilation appears to happen in XmlTableSetColumnFilter, which is
> called from tfuncInitialize.
>

it is called per input row.

> I can't guarantee I didn't miss something, though.
>
> > We designed it more tolerant as
> > we expected possibility to store XPath expression in one column and data
> in
> > second column.
>
> Perhaps if I could see an example showing the functionality... The nearest
> I could find in the regression tests was the test with
> COLUMNS a int PATH '' || lower(_path) || 'c'
> but, again, I think that test only demonstrates how LATERAL works, not
> any behavior specific to xmltable.
>

the main reason for this was not to support support some specific patterns
- just used design doesn't requires stronger changes in executor or
internal multi call caching of some internal data. Probably you can find
discussion related to this topic in mailing list archive.

sure - using any expression in PATH clause should to demonstrate this
functionality.

> Regards,
> -Chap
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesse Zhang 2019-01-20 07:39:37 Re: A small note on the portability of cmake
Previous Message Chapman Flack 2019-01-20 05:06:06 Re: PostgreSQL vs SQL/XML Standards