postgresql/src
Tom Lane 8fd3fdd85a Simplify the planner's new representation of indexable clauses a little.
In commit 1a8d5afb0, I thought it'd be a good idea to define
IndexClause.indexquals as NIL in the most common case where the given
clause (IndexClause.rinfo) is usable exactly as-is.  It'd be more
consistent to define the indexquals in that case as being a one-element
list containing IndexClause.rinfo, but I thought saving the palloc
overhead for making such a list would be worthwhile.

In hindsight, that was a great example of "premature optimization is the
root of all evil": it's complicated everyplace that needs to deal with
the indexquals, requiring duplicative code to handle both the simple
case and the not-simple case.  I'd initially found that tolerable but
it's getting less so as I mop up some areas that I'd not touched in
1a8d5afb0.  In any case, two more pallocs during a planner run are
surely at the noise level (a conclusion confirmed by a bit of
microbenchmarking).  So let's change this decision before it becomes
set in stone, and insist that IndexClause.indexquals always be a valid
list of the actual index quals for the clause.

Discussion: https://postgr.es/m/24586.1550106354@sss.pgh.pa.us
2019-02-14 19:37:30 -05:00
..
backend Simplify the planner's new representation of indexable clauses a little. 2019-02-14 19:37:30 -05:00
bin More unconstify use 2019-02-13 11:50:16 +01:00
common More float test and portability fixes. 2019-02-13 19:35:50 +00:00
fe_utils More unconstify use 2019-02-13 11:50:16 +01:00
include Simplify the planner's new representation of indexable clauses a little. 2019-02-14 19:37:30 -05:00
interfaces More unconstify use 2019-02-13 11:50:16 +01:00
makefiles Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:54:56 +00:00
pl More unconstify use 2019-02-13 11:50:16 +01:00
port Fix portability issues in pg_bitutils 2019-02-13 20:09:48 -03:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Remove a stray subnormal value from float tests. 2019-02-13 20:42:57 +00:00
timezone More unconstify use 2019-02-13 11:50:16 +01:00
tools Add basic support for using the POPCNT and SSE4.2s LZCNT opcodes 2019-02-13 16:10:06 -03:00
tutorial SQL comment: remove extra word in heading comment 2019-01-25 18:57:21 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Add basic support for using the POPCNT and SSE4.2s LZCNT opcodes 2019-02-13 16:10:06 -03:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00