Re: Performance problem in textanycat/anytextcat

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2010-05-16T18:20:23Z
Lists: pgsql-hackers
On Sun, May 16, 2010 at 1:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Couldn't you apply this argument to any built-in immutable function whatsoever?
>
> No, only the ones that are built on top of other functions that aren't
> immutable.

Built on top of?  I don't get it.  It seems like anything of the form
immutablefunction(volatilefunction()) is vulnerable to this, and you
can give a volatile function as an argument to any function you like.
If you're saying we're testing for immutability by looking only at the
outermost function call, that seems pretty broken.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company