creating index's on functions.

From: Jeff MacDonald <jeff(at)interchange(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: creating index's on functions.
Date: 2003-10-06 14:09:18
Message-ID: 1065449358.5115.4.camel@milhouse.bignose.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-10-06 14:14:55 Re: Nested SPI_exec's
Previous Message Marc G. Fournier 2003-10-06 14:08:02 Re: PostgreSQL Beta4 Tag'd and Bundle'd ...