postgresql/src/include
Tom Lane 0777f7a2e8 Fix matching of boolean index columns to sort ordering.
Normally, if we have a WHERE clause like "indexcol = constant",
the planner will figure out that that index column can be ignored
when determining whether the index has a desired sort ordering.
But this failed to work for boolean index columns, because a
condition like "boolcol = true" is canonicalized to just "boolcol"
which does not give rise to an EquivalenceClass.  Add a check to
allow the same type of deduction to be made in this case too.

Per a complaint from Dima Pavlov.  Arguably this is a bug, but given the
limited impact and the small number of complaints so far, I won't risk
destabilizing plans in stable branches by back-patching.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/1788.1481605684@sss.pgh.pa.us
2017-01-15 14:09:35 -05:00
..
access Fix ALTER TABLE / SET TYPE for irregular inheritance 2017-01-09 19:26:58 -03:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
commands Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
common Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
datatype Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
executor Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
fe_utils Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
foreign Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
lib Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
libpq Re-allow SSL passphrase prompt at server start, but not thereafter. 2017-01-04 12:44:03 -05:00
mb Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
optimizer Fix matching of boolean index columns to sort ordering. 2017-01-15 14:09:35 -05:00
parser Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
port Prefer int-wide pg_atomic_flag over char-wide when using gcc intrinsics. 2017-01-04 13:36:55 -05:00
portability Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rewrite Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
snowball Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
storage Update obsolete comments in lwlock.h. 2017-01-04 12:03:40 -05:00
tcop Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
tsearch Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
utils Change representation of statement lists, and add statement location info. 2017-01-14 16:02:35 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
fmgr.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
funcapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getaddrinfo.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getopt_long.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
miscadmin.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_config.h.in Use clock_gettime(), if available, in instr_time measurements. 2017-01-02 13:41:51 -05:00
pg_config.h.win32 Use clock_gettime(), if available, in instr_time measurements. 2017-01-02 13:41:51 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_getopt.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_trace.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgstat.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgtar.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgtime.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
port.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres_ext.h Add a nonlocalized version of the severity field to client error messages. 2016-08-26 16:20:17 -04:00
postgres_fe.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rusagestub.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
windowapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00