From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: xpath functionerror |
Date: | 2014-02-26 16:52:09 |
Message-ID: | 1393433529705-5793727.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
sparikh wrote
> Hi,
>
> My current database version is "PostgreSQL 9.1.11 on
> x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat
> 4.4.7-3), 64-bit".
>
> I am trying to use function xpath in my query and got following error.
>
> "ERROR: function xpath(unknown, text) does not exist at character 8
> HINT: No function matches the given name and argument types. You might
> need to add explicit type casts.
>
> I could see the library pgxml.so libray in /usr/pgsql-9.1/lib . Could
> someone please advise me what more needs to be done in order to run xpath
> queris?
>
> Thanks in advance.
The valid function signature is:
xpath(xpath text, xmlcontent xml, [ nsarray text[][] ])
http://www.postgresql.org/docs/9.1/static/functions-xml.html
The "unknown" above will be converted to "text" but the "text" above will
never be converted to "xml". You must perform this conversion yourself and
pass the converted value - now of type xml - to the function.
The documentation explains how to perform this conversion.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/xpath-functionerror-tp5793724p5793727.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-02-26 16:56:08 | Re: Cancelling of autovacuums considered harmful |
Previous Message | sparikh | 2014-02-26 16:29:31 | xpath functionerror |