Re: Proposal: XML helper functions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: XML helper functions
Date: 2010-01-05 21:13:56
Message-ID: 1262726036.6448.3.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2010-01-05 at 11:50 -0800, Scott Bailey wrote:
> > There has been talk about adding something like xpath_string,
> > xpath_number, xpath_boolean for fetching xpath expressions that
> don't
> > return nodesets. I think that would fit your use case.
>
> The first two sound very much like what I'm looking for. I'm unsure
> about the third. Is it's purpose to extract the scalar value of an
> expression and cast to bool as the other two do, or is it to identify
> if the xpath expression returned any nodes like xmlexists?

XPath as a language has four data types: nodeset, string, number,
boolean. So an XPath expression could return any of those types. Then,
I suppose, the xpath_foo() function would evaluate the expression and
return the result as type foo, possibly raising an error if the types
don't match.

Details to be determined.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-01-05 21:20:52 Re: Writeable CTEs
Previous Message Jeff Davis 2010-01-05 21:08:58 Re: true serializability and predicate locking