Re: missing support for using regex and arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: missing support for using regex and arrays
Дата
Msg-id 29698.1084275882@sss.pgh.pa.us
обсуждение исходный текст
Ответ на missing support for using regex and arrays  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Список pgsql-bugs
Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:
> I need to solve checking varchar array. I can write
> CHECK('aaa' = ALL(x)) -- x is array
> but I can't CHECK(ALL(x) = 'aaaa') or CHECK (ALL(x) ~ 'regex')
> I know so I can write plpgsql function. I have question for hackers. Do
> You plan better support for it?

No.  The ALL keyword has to follow the operator it applies to --- the
syntax is not just "all(something)" but "something op all(something)".
I don't think we can relax that without creating syntactic ambiguity.

If you want to work with non-commutative operators such as regex, you
may need to invent your own operator.

            regards, tom lane

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

Предыдущее
От: Martin Pitt
Дата:
Сообщение: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1151: Initdb fails ...