From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Mark some more I/O-conversion-invoking functions as stable not v |
Date: | 2012-02-08 16:29:43 |
Message-ID: | E1RvAOt-0004m0-7G@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Mark some more I/O-conversion-invoking functions as stable not volatile.
When written, textanycat, anytextcat, quote_literal, and quote_nullable
were marked volatile, because they could invoke arbitrary type-specific
output functions as part of casting their anyelement arguments to text.
Since then, we have defined a project policy that I/O functions must not
be volatile, as per commit aab353a60b95aadc00f81da0c6d99bde696c4b75.
So these functions can safely be downgraded to stable. Most of the time
this makes no difference since they'll get inlined anyway, but as noted
by Andrew Dunstan, there are cases where the volatile marking prevents
optimizations that the planner does before function inlining. (I think
I might have overlooked these functions in the earlier commit on the
grounds that inlining would make it moot, but not so --- tgl)
This change results in a change in the expected output of the json
regression tests, because the planner can now flatten a sub-select
that it failed to before. The old output is preferable, but getting
that back will require some as-yet-unfinished work on RowExpr handling.
Marti Raudsepp
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3db6524fe63f0598dcb2b307bb422bc126f2b15d
Modified Files
--------------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 8 +++---
src/test/regress/expected/json.out | 46 ++++++++++++++++++------------------
3 files changed, 28 insertions(+), 28 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-02-08 17:41:58 | pgsql: Support min/max index optimizations on boolean columns. |
Previous Message | Robert Haas | 2012-02-08 14:34:08 | pgsql: Add transform functions for various temporal typmod coercisions. |