From: Bruce Momjian on
Mike Fowler wrote:
> Robert Haas wrote:
> > Please email your patch to the list (replying to this email is fine)
> > and add it here:
> > https://commitfest.postgresql.org/action/commitfest_view/open
> >
> Here's my patch, developed against HEAD, that adds the function
> 'xpath_exists'. The function is a lot simpler than originally thought,
> so none of the string manipulation previously discussed was required.
> I've also included some regression tests that test the function with and
> without xml namespaces. I should note that before I added my tests all
> existing tests passed.
>
> One observation that can be made is that I've largely copied the
> existing xpath function and altered it to use a different method from
> the libxml API. I've done it to save me redoing all the namespace
> handling, however it's apparent to me that if we wanted to expose more
> of the libxml api we will quickly start having a lot of duplicate code.
> I notice that refactoring existing code whilst adding new code is
> generally frowned upon, so once this patch is accepted I will look to
> refactor the xpath and xpath_exists function. I could even add an
> xpath_count method at the same time ;) .
>
> Thanks in advance for any and all feedback,

I have added this to the next commit-fest:

https://commitfest.postgresql.org/action/commitfest_view?id=6

--
Bruce Momjian <bruce(a)momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +


--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Mike Fowler on
Bruce Momjian wrote:
> I have added this to the next commit-fest:
>
> https://commitfest.postgresql.org/action/commitfest_view?id=6
>
>
Thanks Bruce. Attached is a revised patch which changes the code
slightly such that it uses an older version of the libxml library. I've
added comments to the code so that we remember why we didn't use the
latest function.

Regards,

--
Mike Fowler
Registered Linux user: 379787



From: Mike Fowler on
Mike Fowler wrote:
> Bruce Momjian wrote:
>> I have added this to the next commit-fest:
>>
>> https://commitfest.postgresql.org/action/commitfest_view?id=6
> Thanks Bruce. Attached is a revised patch which changes the code
> slightly such that it uses an older version of the libxml library.
> I've added comments to the code so that we remember why we didn't use
> the latest function.

After seeing some other posts in the last couple of days, I realised I
hadn't documented the function in the SGML. I have now done so, and
added a couple of tests with XML literals. Please find the patch
attached. Now time to go correct the xmlexists patch too...

--
Mike Fowler
Registered Linux user: 379787