Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard
От
mike@mlfowler.com
Тема
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard
Дата
Msg-id
20100601170634.v9cz5vrx1cg4wcw8@www.mlfowler.com
Ответ на
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard (Peter Eisentraut)
Список
Дерево обсуждения
[PATCH] Add XMLEXISTS function from the SQL/XML standard (was: Add
xpath_exists Function) Mike Fowler <mike@mlfowler.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard (was: Add xpath_exists Function) Peter Eisentraut <peter_e@gmx.net>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Mike Fowler <mike@mlfowler.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard Peter Eisentraut <peter_e@gmx.net>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard mike@mlfowler.com
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Mike Fowler <mike@mlfowler.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard (was: Add xpath_exists Function) "Erik Rijkers" <er@xs4all.nl>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Mike Fowler <mike@mlfowler.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard Robert Haas <robertmhaas@gmail.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Mike Fowler <mike@mlfowler.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Michael Tharp <gxti@partiallystapled.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard Robert Haas <robertmhaas@gmail.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Mike Fowler <mike@mlfowler.com>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML
standard Bruce Momjian <bruce@momjian.us>
Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard Andrew Dunstan <andrew@dunslane.net>
Quoting Peter Eisentraut :
> It would be nice to make XMLEXISTS work as in the standard, seeing how
> many others are providing the same interface.
>
...
>
> I think providing XPath is enough, at least for now.
>
Hi Peter,
From piecing together sections 8.4 () and 6.18
(), I believe the full call signature would be (apologies
if my bracketing isn't right):
XMLEXISTS
( xquery_expression [ PASSING {BY REF|BY VALUE} { (xml_expression [BY REF|BY VALUE]) | (xml_expression AS identifier) } [, ...] ]
)
Seeing as we're only intereseted in XPath for the moment and most of
the syntax above is only really relevant to XQuery, I would suggest
the following as accepatable until full XQuery support comes:
XMLEXISTS
( xpath_expression [ PASSING BY REF xml_expression [BY REF] ]
)
There is one drawback in this approach, namely xml namespace support.
I think borrowing the solution used in the xpath() (i.e. passing a
nsarray) is out of the question as it won't be future proofed against
full XQuery support. This is because the declaration of namespaces in
XQuery is actually part of the query itself. I also think it
inappropriate to attempt to parse the xpath_expression looking for
XQuery style namespace declartions. So I think we ignore declared
namespace support for the moment and just get the syntax correct ready
for XQuery support in the hopefully near future.
Do you agree with what I have proposed?
Regards,
--
Mike Fowler
В списке pgsql-hackers по дате отправления