postgresql/src
Tom Lane 5a86e5e193 Make CREATE INDEX run expression preprocessing on a proposed index expression
before it checks whether the expression is immutable.  This covers two cases
that were previously handled poorly:

1. SQL function inlining could reduce the apparent volatility of the
expression, allowing an expression to be accepted where it previously would
not have been.  As an example, polymorphic functions must be marked with the
worst-case volatility they have for any argument type, but for specific
argument types they might not be so volatile, so indexing could be allowed.
(Since the planner will refuse to inline functions in cases where the
apparent volatility of the expression would increase, this won't break
any cases that were accepted before.)

2. A nominally immutable function could have default arguments that are
volatile expressions.  In such a case insertion of the defaults will increase
both the apparent and actual volatility of the expression, so it is
*necessary* to check this before allowing the expression to be indexed.

Back-patch to 8.4, where default arguments were introduced.
2010-05-27 15:59:10 +00:00
..
backend Make CREATE INDEX run expression preprocessing on a proposed index expression 2010-05-27 15:59:10 +00:00
bin Fix psql help: \da+ is same as \da, but \daS is not. 2010-05-26 19:29:22 +00:00
include Mark PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 with PGDLLEXPORT 2010-05-27 07:59:48 +00:00
interfaces Rearrange libpq's SSL initialization to simplify it and make it handle some 2010-05-26 21:39:27 +00:00
makefiles On Linux, use --enable-new-dtags when specifying -rpath to linker. 2010-05-06 19:28:25 +00:00
pl Fix regression tests to match error message change 2010-05-18 03:35:34 +00:00
port Use __bsdi__ consistently. 2010-05-15 10:14:20 +00:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Fix oversight in join removal patch: we have to delete the removed relation 2010-05-23 16:34:38 +00:00
timezone Change the "N. Central Asia Standard Time" timezone to map to 2010-05-20 14:13:11 +00:00
tools Fix MSVC builds for recent plperl changes. Go back to version 8.2, which is 2010-05-13 21:33:00 +00:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:02 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Rethink the way walreceiver is linked into the backend. Instead than shoving 2010-01-20 09:16:24 +00:00
Makefile.global.in Fix vpath installation from distribution tarball (bug #5447) 2010-05-13 11:49:48 +00:00
Makefile.shlib Derived files that are shipped in the distribution used to be built in the 2009-08-28 20:26:19 +00:00
nls-global.mk Avoid error from mkdir if no languages are to be installed 2010-05-13 14:35:28 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00