BUG #4294: XML support: name() xpath function not working - Mailing list pgsql-bugs

From Enrico Sirola
Subject BUG #4294: XML support: name() xpath function not working
Date
Msg-id 200807100852.m6A8qvYM072317@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4294: XML support: name() xpath function not working
Re: BUG #4294: XML support: name() xpath function not working
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4294
Logged by:          Enrico Sirola
Email address:      enrico.sirola@gmail.com
PostgreSQL version: 8.3
Operating system:   OSX, Linux (RHEL5)
Description:        XML support: name() xpath function not working
Details:

it seems the name() xpath function doesn't work properly. Try, for example,
the following sql script:

create table test (test xml);
insert into test values ('<a
xmlns="http://myns.com/ns"><b>text1</b><c>text2</c></a>');
-- good
select xpath('/my:a/*[last()]', test, ARRAY[ARRAY['my',
'http://myns.com/ns']]) from test;
-- bad
select xpath('name(/my:a/*[last()])', test, ARRAY[ARRAY['my',
'http://myns.com/ns']]) from test;

It seems the libxml2 version and the OS used is not relevant. The problem
affects all pgsql versions >= 8.3.0

Best regards,
Enrico

pgsql-bugs by date:

Previous
From: "Lampa"
Date:
Subject: BUG #4292: directory pg_clog never cleaned
Next
From: Zdenek Kotala
Date:
Subject: Re: BUG #4292: directory pg_clog never cleaned