postgresql/src/include
Tom Lane e7ef6d7e24 Fix planner to pass correct collation to operator selectivity estimators.
We can do this without creating an API break for estimation functions
by passing the collation using the existing fmgr functionality for
passing an input collation as a hidden parameter.

The need for this was foreseen at the outset, but we didn't get around to
making it happen in 9.1 because of the decision to sort all pg_statistic
histograms according to the database's default collation.  That meant that
selectivity estimators generally need to use the default collation too,
even if they're estimating for an operator that will do something
different.  The reason it's suddenly become more interesting is that
regexp interpretation also uses a collation (for its LC_TYPE not LC_COLLATE
property), and we no longer want to use the wrong collation when examining
regexps during planning.  It's not that the selectivity estimate is likely
to change much from this; rather that we are thinking of caching compiled
regexps during planner estimation, and we won't get the intended benefit
if we cache them with a different collation than the executor will use.

Back-patch to 9.1, both because the regexp change is likely to get
back-patched and because we might as well get this right in all
collation-supporting branches, in case any third-party code wants to
rely on getting the collation.  The patch turns out to be minuscule
now that I've done it ...
2012-07-08 23:51:08 -04:00
..
access Tighten up includes in sinvaladt.h, twophase.h, proc.h 2012-06-25 18:40:40 -04:00
bootstrap Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
catalog Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
commands Have REASSIGN OWNED work on extensions, too 2012-07-03 15:09:59 -04:00
datatype Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
executor Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
foreign Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
lib Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
libpq Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
mb Add wchar -> mb conversion routines. 2012-07-04 17:10:10 -04:00
nodes Fix memory leak in ARRAY(SELECT ...) subqueries. 2012-06-21 17:27:19 -04:00
optimizer Fix planner to pass correct collation to operator selectivity estimators. 2012-07-08 23:51:08 -04:00
parser Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
port Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
portability Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
regex Simplify and document regex library's compact-NFA representation. 2012-07-07 17:39:50 -04:00
replication Make walsender more responsive. 2012-07-02 09:41:01 -04:00
rewrite Prevent CREATE TABLE LIKE/INHERITS from (mis) copying whole-row Vars. 2012-06-30 16:45:14 -04:00
snowball Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
storage When LWLOCK_STATS is defined, count spindelays. 2012-06-26 16:06:07 -04:00
tcop Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
tsearch Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
utils Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
fmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
funcapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getaddrinfo.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Fix server header file installation with vpath builds 2011-11-10 20:52:54 +02:00
miscadmin.h Do stack-depth checking in all postmaster children. 2012-04-08 19:07:55 +03:00
pg_config_manual.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pg_config.h.in Remove support for using wait3() in place of waitpid(). 2012-07-05 14:00:40 -04:00
pg_config.h.win32 Remove support for using wait3() in place of waitpid(). 2012-07-05 14:00:40 -04:00
pg_trace.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pgstat.h Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
pgtime.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
port.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
postgres_ext.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postgres.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00