From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Chapman Flack <chap(at)anastigmatix(dot)net> |
Cc: | Markus Winand <markus(dot)winand(at)winand(dot)at>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL vs SQL/XML Standards |
Date: | 2019-01-14 12:33:01 |
Message-ID: | CAFj8pRBBOBqVvKW0yQpYVyWHSJfPvKanXgEPpLkk29pp4gG9dQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
po 14. 1. 2019 v 2:41 odesílatel Chapman Flack <chap(at)anastigmatix(dot)net>
napsal:
> There is a bug that remains, in the
> else if (xpathobj->type == XPATH_STRING)
> case.
>
> As it is now, it simply passes the string value of the result
> into the output column's type-input function, regardless of the
> output column type.
>
> If the output column type is xml, this will attempt to parse the
> string as xml. The result should simply be xml content consisting of
> a text node representing the string (as by XMLTEXT()). If it contains
> XML metacharacters, they should be escaped.
>
> For a non-xml output column, the string should be used directly,
> as it is now.
>
> # select * from xmltable('.' passing xmlelement(name a)
> columns a text path '"<foo/>"', b xml path '"<foo/>"');
> a | b
> --------+--------
> <foo/> | <foo/>
>
> Oracle fiddle for comparison:
>
>
> https://dbfiddle.uk/?rdbms=oracle_18&fiddle=26f91a9e55a6908c2bcf848b464ca381
>
> A B
> <foo/> <foo/>
>
should be fixed in last patch
Regards
Pavel
> -Chap
>
Attachment | Content-Type | Size |
---|---|---|
xmltable-xpath-result-processing-bugfix-5.patch | text/x-patch | 14.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2019-01-14 12:53:35 | Re: [Patch] Create a new session in postmaster by calling setsid() |
Previous Message | Daniel Verite | 2019-01-14 12:23:53 | Re: insensitive collations |