Comparing a string against an XPath result set

Поиск
Список
Период
Сортировка
От Tim Landscheidt
Тема Comparing a string against an XPath result set
Дата
Msg-id m3ljmocolf.fsf@passepartout.tim-landscheidt.de
обсуждение исходный текст
Список pgsql-sql
Hi,

I'm trying to check whether a given string is part of an
XPath result set. I have encountered some performance prob-
lems in the process, but before I track those down further,
I'd like to see if I've chosen the right path to begin with:

| SELECT * FROM $TABLE
|   WHERE $COLUMN = ANY((xpath($EXPR, xmlparse(DOCUMENT $DOC)))::TEXT[]);

In this case, xpath() returns an array of XML fragments made
of a "pure" text child each. I cannot compare XML fragments
with anything, so the conversion to TEXT[] seems to be the
only way I could check whether $COLUMN is a part of those.
 Is there any other way I could tackle this?

Tim



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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: Request new version to support "on commit drop" for create temp table ... as select ?
Следующее
От: Christophe
Дата:
Сообщение: De-duplicating rows