Adding Indexes to Functions - Mailing list pgsql-general

From Jeff MacDonald
Subject Adding Indexes to Functions
Date
Msg-id 1065449706.5115.10.camel@milhouse.bignose.ca
Whole thread Raw
Responses Re: Adding Indexes to Functions  (Bruno Wolff III <bruno@wolff.to>)
Re: Adding Indexes to Functions  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Hi,

I have a table, where one of the columns "extradata" is a gob of XML.
I'd like to be able to create an index on this function.. so i tried
this


CREATE INDEX actitemsXML_idx ON act_items
(pgxml_xpath(extradata,'//RequestInfo/refund_id/text()','',''));

And i got this nice little error

ERROR:  parser: parse error at or near
"'//RequestInfo/refund_id/text()'" at character 66

I tried escaping the single quotes.. that basically leaves me at a psql
prompt with a ', meaning i need to close my quote, but they're all
escaped.

If anyone has any input for adding index's on functions that have single
quotes in them, that would be great.

Thanks.

Jeff.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Nested SPI_exec's
Next
From: Bruno Wolff III
Date:
Subject: Re: Adding Indexes to Functions