Re: Regular expressions and arrays and ANY() question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regular expressions and arrays and ANY() question
Дата
Msg-id 10631.1169531978@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Regular expressions and arrays and ANY() question  (webb.sprague@gmail.com)
Ответы Re: Regular expressions and arrays and ANY() question  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
webb.sprague@gmail.com writes:
> I am trying to figure out how to use a regex and an ANY(), without any
> luck, to determine if at least one element of an array (on the right)
> matches the given constant pattern (on the left).

>  I think the problem is because the pattern expects to be on the right
> side with the target on the left, but I want to do it reversed.

Yeah, the ANY syntax only allows the array on the right.  You'd have to
make a LIKE-ish operator that takes the pattern on the left ... it'd
take about two minutes to do this with a SQL or plpgsql function
underlying the operator, but such a function might not be fast enough
for you ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: too many trigger records found for relation "item" - what's that about??
Следующее
От: Tom Lane
Дата:
Сообщение: Re: New US DST Rules & PostgreSQL