Re: patch for contrib/xml2

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: patch for contrib/xml2
Date: 2007-02-18 18:57:56
Message-ID: e431ff4c0702181057q246d31fdq25ad6fde657156b6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Please wait a little bit, I'll send updated patch (xpath_array() in core)
tonight or tomorrow.

It seems so that there is no actual needs in other xpath-functions...
Just to recall:
- xpath_array() produces xml[] as a result -- so, it's possible to process
then any of returned XML fragments, with proper type casting;
- also xpath_boolean(), xpath_string() and xpath_number() were proposed,
according current functions from contrib/xml2. They are intended to return
scalar value, first found by XPath expression. I saw serious problems with
them -- e.g. it's quite ugly to return always first value of the sequence
(but it might be useful in practice, surely) and, moreover, from my POV,
xpath_string('/a/text()', '<a>very <b>simple</b> example</a>') should
produce 'very simple example' (not 'very ' and not 'very example') -- due
to XML semantics. This differs xpath_string() from other two...

So, my proposal is to include only one function and forget about that three
until we have a better vision ...

I'll raise other (less important) questions with patch sent, shortly.

On 2/18/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> Peter Eisentraut wrote:
> > Bruce Momjian wrote:
> > > Should we revisit xpath_array() for 8.3, or is this all in core now?
> >
> > Not yet, but we are currently discussing how.
>
> Uh, was this handled?
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>

--
Best regards,
Nikolay

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Jeremy Drake 2007-02-18 20:03:35 Re: patch adding new regexp functions
Previous Message Chad Wagner 2007-02-18 18:00:58 Allow \pset to parse "on or off" for boolean values