postgresql/src/backend
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
..
access Adjust comment to reflect that we now have Hot Standby. Pointed out by 2010-05-27 00:38:39 +00:00
bootstrap Move the responsibility for calling StartupXLOG into InitPostgres, for 2010-04-20 01:38:52 +00:00
catalog Fix vpath installation from distribution tarball (bug #5447) 2010-05-13 11:49:48 +00:00
commands Make CREATE INDEX run expression preprocessing on a proposed index expression 2010-05-27 15:59:10 +00:00
executor Introduce wal_level GUC to explicitly control if information needed for 2010-04-28 16:10:43 +00:00
foreign Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
lib Work around a subtle portability problem in use of printf %s format. 2010-05-08 16:39:53 +00:00
libpq Fix bogus error message for SSL-cert authentication, due to lack of 2010-05-26 20:47:13 +00:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Fix "constraint_exclusion = partition" logic so that it will also attempt 2010-03-30 21:58:11 +00:00
optimizer Fix oversight in construction of sort/unique plans for UniquePaths. 2010-05-25 17:44:41 +00:00
parser Adjust comments about avoiding use of printf's %.*s. 2010-05-09 02:16:00 +00:00
po Remove CRs. 2010-05-14 10:37:02 +00:00
port Add code to InternalIpcMemoryCreate() to handle the case where shmget() 2010-05-01 22:46:30 +00:00
postmaster Avoid starting walreceiver in states where it shouldn't be running. 2010-05-27 02:01:37 +00:00
regex pgindent run for 9.0 2010-02-26 02:01:40 +00:00
replication Thinko in previous commit: ensure that MAX_SEND_SIZE is always greater 2010-05-26 22:34:49 +00:00
rewrite pgindent run for 9.0 2010-02-26 02:01:40 +00:00
snowball Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
storage HS Defer buffer pin deadlock check until deadlock_timeout has expired. 2010-05-26 19:52:52 +00:00
tcop Give most recovery conflict errors a retryable error code. From recent 2010-05-12 19:45:02 +00:00
tsearch Adjust comments about avoiding use of printf's %.*s. 2010-05-09 02:16:00 +00:00
utils Adjust comments about avoiding use of printf's %.*s. 2010-05-09 02:16:00 +00:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
Makefile Update comment about why postmaster doesn't get an icon. 2010-05-12 23:48:36 +00:00
nls.mk Convert the core lexer and parser into fully reentrant code, by making use 2009-07-13 02:02:20 +00:00