Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results
Дата
Msg-id 01b901cddf18$846d09c0$8d471d40$@yahoo.com
обсуждение исходный текст
Ответ на Using POSIX Regular Expressions on xml type fields gives inconsistent results  (Denis Papathanasiou <denis.papathanasiou@banrai.com>)
Список pgsql-general
>
> I have a table with an xml type column, and while I can make regex queries
> like this successfully:
>
> => select id from form_d where 'kumar' ~* any(
> CAST(xpath('//PersonsList/PersonName/LastName/text()', data) as TEXT[])
> );

It took me way too long to figure this out:

SELECT 'text to search against'  ~* 'regular expression'

The text to be searched must be on the left-hand side of the operator and
thus the regular expression operators cannot be used with "ANY/ALL" because
they require that the text to be search exist on the right-hand side of the
operator.

I'll let others respond as to the difficulty of implementing a LHS-Array
version of ANY/ALL

David J.




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

Предыдущее
От: Denis Papathanasiou
Дата:
Сообщение: Using POSIX Regular Expressions on xml type fields gives inconsistent results
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results