pgsql: Fix the volatility marking of textanycat() and anytextcat(): they - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix the volatility marking of textanycat() and anytextcat(): they
Date
Msg-id 20100527162011.8D87A7541D2@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix the volatility marking of textanycat() and anytextcat(): they were marked
immutable, but that is wrong in general because the cast from the polymorphic
argument to text could be stable or even volatile.  Mark them volatile for
safety.  In the typical case where the cast isn't volatile, the planner will
deduce the correct expression volatility after inlining the function, so
performance is not lost.  The just-committed fix in CREATE INDEX also ensures
this won't break any indexing cases that ought to be allowed.

Per discussion, I'm not bumping catversion for this change, as it doesn't
seem critical enough to force an initdb on beta testers.

Modified Files:
--------------
    pgsql/src/include/catalog:
        pg_proc.h (r1.570 -> r1.571)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h?r1=1.570&r2=1.571)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Make CREATE INDEX run expression preprocessing on a proposed
Next
From: petere@postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Small correction/clarification in discussion of Unicode literals