From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Rod Taylor <rod(dot)taylor(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Could regexp_matches be immutable? |
Date: | 2009-10-21 13:12:31 |
Message-ID: | 26630.1256130751@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-10-21 13:28:18 | Re: \du quite ugly in 8.4 |
Previous Message | Andrew Dunstan | 2009-10-21 13:08:23 | Re: UTF8 with BOM support in psql |