Re: Could regexp_matches be immutable?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Could regexp_matches be immutable?
Дата
Msg-id 26630.1256130751@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Could regexp_matches be immutable?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On Tue, 2009-10-20 at 20:48 -0400, Tom Lane wrote:
>> So I went to see about making the changes to remove regex_flavor, and
>> was astonished to find that all the regex-related functions are already
>> marked immutable, and AFAICS always have been.  This is clearly wrong,
>> and we would have to fix it if we weren't about to remove the GUC.

> Are you sure this wasn't intentional, because it breaks performance and
> we doubted that many applications would change regex_flavor on the fly?

Intentional or not, it's wrong :-(

In practice I doubt there are many cases where constant-folding a regex
would be possible or performance-critical.  The real use of having it
be immutable is probably Rod's, ie, using it in an index.  And that is
*obviously* really dangerous if there's a GUC affecting the results.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: UTF8 with BOM support in psql
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: \du quite ugly in 8.4