Re: patch: function xmltable - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: patch: function xmltable
Date
Msg-id CAFj8pRA5vz20Le5EQ-5MGygWs7kh0azTRLt9=rvS8GWMWfw_jA@mail.gmail.com
Whole thread Raw
In response to Re: patch: function xmltable  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: patch: function xmltable
Re: patch: function xmltable
List pgsql-hackers
Hi

2016-11-24 0:13 GMT+01:00 Alvaro Herrera <alvherre@2ndquadrant.com>:
Oh my, I just noticed we have a new xpath preprocessor in this patch
too.  Where did this code come from -- did you write it all from
scratch?

I wrote it from scratch - libxml2 has not any API for iteration over XPath expression (different than iteration over XPath expression result), and what I have info, there will not be any new API in libxml2.

There are two purposes:

Safe manipulation with XPath expression prefixes - ANSI SQL design implicitly expects some prefix, but it can be used manually. The prefix should not be used twice and in some situations, when it can breaks the expression.

Second goal is support default namespaces - when we needed parser for first task, then the enhancing for this task was not too much lines more.

This parser can be used for enhancing current XPath function - default namespaces are pretty nice, when you have to use namespaces.
 

--
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Calculation of param_source_rels in add_paths_to_joinrel
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: Re: [bug fix] Cascading standby cannot catch up and get stuck emitting the same message repeatedly