[HACKERS] xpath improvement V2

2010-02-12 Thread Arie Bikker
DATA_EXCEPTION (in xml.c) acceptable as error code for a type mismatch? Could not find anything better. kind regards, Arie Bikker ../makepatch -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] xpath improvement V2

2010-02-12 Thread Arie Bikker
And here is the patch. *** doc/src/sgml/func.sgml.org Tue Feb 2 12:53:59 2010 --- doc/src/sgml/func.sgml Fri Feb 12 21:49:01 2010 *** *** 1,4 ! Functions and Operators --- 1,4 ! Functions and Operators *** *** 821,827

Re: [HACKERS] xpath improvement V2 with xml.c

2010-02-12 Thread Arie Bikker
And a patch for the code implementing this *** doc/src/sgml/func.sgml.org Tue Feb 2 12:53:59 2010 --- doc/src/sgml/func.sgml Fri Feb 12 21:49:01 2010 *** *** 1,4 ! Functions and Operators --- 1,4 ! Functions and Operators *** *** 821,827

[HACKERS] xpath improvement suggestion

2010-01-05 Thread Arie Bikker
of the revisioned code with respect to original is in attached file. kind regards, Arie Bikker 114d113 < static text *xml_xmlpathobjtoxmltype(xmlXPathObjectPtr cur); 3269,3309d3267 < < /* < * Convert XML pathobject to text for non-nodeset objects < */ < static text * < xml_xmlp

Re: [HACKERS] xpath improvement suggestion

2010-01-06 Thread Arie Bikker
Robert Haas wrote: On Tue, Jan 5, 2010 at 6:09 PM, Arie Bikker wrote: Hi all, Well I had  to burn some midnight oil trying to figure out why a construct like SELECT xpath('name()',''); doesn't give the expected result. Kept getting an empty array:  xpath

Re: [HACKERS] xpath improvement suggestion

2010-01-06 Thread Arie Bikker
Sorry for the previous NUUUB post, didn't now the mailing list doesn't support html ;( Robert Haas wrote: On Tue, Jan 5, 2010 at 6:09 PM, Arie Bikker wrote: Hi all, Well I had to burn some midnight oil trying to figure out why a construct like SELECT xpath('name()',&

Re: [HACKERS] xpath improvement suggestion

2010-01-11 Thread Arie Bikker
Peter Eisentraut wrote: On ons, 2010-01-06 at 23:46 +0100, Arie Bikker wrote: Hope this is the right attachement type (I'm new at this) BTW. here a some nice examples: - Get the number of attributes of the first childnode: select ( xpath('count(@*)',(xpath('*[1]