possible to create multivalued index from xpath() results in 8.3?

Поиск
Список
Период
Сортировка
От Matt Magoffin
Тема possible to create multivalued index from xpath() results in 8.3?
Дата
Msg-id 52218.192.168.1.108.1195458742.squirrel@msqr.us
обсуждение исходный текст
Ответы Re: possible to create multivalued index from xpath() results in 8.3?
Список pgsql-general
I've working with XML in Postgres 8.3 and am trying to find a way to
create a text-based index from an XPath that returns multiple nodes. For
example, if I have an XPath like

/elem[@key="mykey"]/text()

which might return a few text nodes like

value1
value2
value3

I'd like 3 index values associated with this row's index key: {value1,
value2, value3). I was trying to figure out a way to define an index like
this but ran into a couple of issues:

1) The xpath() function returns an array of XML type, but in the above
example the text nodes are joined together into a single xml result node,
like {value1value2value3}. How can I get it to return 3 individual text
nodes, so an array of 3 values instead of 1?

2) Even if I could have an xpath() result return an array with multiple
values, like {value1,value2,value3} I wasn't able to define a GIN index
against the xml[] type. Should this be possible?

-- m@

В списке pgsql-general по дате отправления:

Предыдущее
От: Ow Mun Heng
Дата:
Сообщение: Re: Calculation for Max_FSM_pages : Any rules of thumb?
Следующее
От: "Francis Waweru"
Дата:
Сообщение: Function Problems