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
|
| Список | 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 по дате отправления: