Re: xpath
От | Otandeka Simon Peter |
---|---|
Тема | Re: xpath |
Дата | |
Msg-id | efc321cd1002100034v1682c10dubd9c5056243c41fc@mail.gmail.com обсуждение исходный текст |
Ответ на | xpath (Allan Kamau <kamauallan@gmail.com>) |
Ответы |
Re: xpath
Re: xpath |
Список | pgsql-general |
Allan,
Postgres is very strict on variable types and char conversion. I have a feeling you are trying to access data from a varchar feild using an integer...
Can you paste here your schema for that table?
P.
Postgres is very strict on variable types and char conversion. I have a feeling you are trying to access data from a varchar feild using an integer...
Can you paste here your schema for that table?
P.
On Wed, Feb 10, 2010 at 11:06 AM, Allan Kamau <kamauallan@gmail.com> wrote:
Hi,
I am running postgreSQL-8.4.2. I have a table that stores a single xml
document per row in one of it's fields. I would like to use xpath to
retrieve portions of these xml documents.
Is there a way to do so. (I am running postgreSQL 8.4.2 configured
(built) with --with-libxml and --with-libxslt options)
I have looked at 'xpath' but I am unable to get it work for table fields.
The command below works.
SELECT xpath('/doc/name/@first','<doc><name first="David"
last="Marston"/>...</doc>');
The command below seems not to execute successfully
SELECT a.id,xpath('/doc/name/@first',a.xml_payload) FROM
staging.simple_table a WHERE a.id=1;
HINT: No function matches the given name and argument types. You
might need to add explicit type casts.
Allan.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: