Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard

From: Mike Fowler <mike(at)mlfowler(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard
Date: 2010-05-26 10:47:25
Message-ID: 4BFCFC3D.6020704@mlfowler.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> On tis, 2010-05-25 at 15:31 +0100, Mike Fowler wrote:
>
>> I've been reading the SQL/XML standard and discovered that it defines a
>> function named XMLEXISTS that does exactly what the todo item
>> xpath_exists defines. My original patch named the function as per the
>> todo but I think using the function name from the standard is a better
>> idea. So this patch is the same as before, but the function is now named
>> XMLEXISTS instead of xpath_exists.
>>
>
> The XMLEXISTS function works with XQuery expressions and doesn't have
> the call signature that your patch implements

Looking at the manuals of Oracle, Derby and DB2 I see how the call
signature differs. I also note that Oracle's implementation is XPath
only, Derby's is partial XQuery and DB2 appears to be full XQuery.

What do people prefer me to do? I see the options as:

1) Change the call signature to match the standard
2) Change the function name back to xpath_exists

Should option one be the more popular there's further choices:

1) Integrate XQuery support to completely match the standard, however
this will require the addition of a new library libxquery
2) Leave the XPath as is, inline with Oracle's implementation
3) Hybrid approach. Since XML is a comple time option, add XQuery as
another. Conditional completion gives the full XQuery support when
available or just the XPath when not

Thoughts?

--
Mike Fowler
Registered Linux user: 379787

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2010-05-26 10:54:18 Re: ExecutorCheckPerms() hook
Previous Message Peter Eisentraut 2010-05-26 10:14:12 Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard (was: Add xpath_exists Function)