postgresql/src
Tom Lane 5d7d12de56 Fix gincostestimate to handle ScalarArrayOpExpr reasonably.
The original coding of this function overlooked the possibility that
it could be passed anything except simple OpExpr indexquals.  But
ScalarArrayOpExpr is possible too, and the code would probably crash
(and surely give ridiculous answers) in such a case.  Add logic to try
to estimate sanely for such cases.

In passing, fix the treatment of inner-indexscan cost estimation: it was
failing to scale up properly for multiple iterations of a nestloop.
(I think somebody might've thought that index_pages_fetched() is linear,
but of course it's not.)

Report, diagnosis, and preliminary patch by Marti Raudsepp; I refactored
it a bit and fixed the cost estimation.

Back-patch into 9.1 where the bogus code was introduced.
2011-12-20 19:57:40 -05:00
..
backend Fix gincostestimate to handle ScalarArrayOpExpr reasonably. 2011-12-20 19:57:40 -05:00
bin Translation updates 2011-12-01 23:03:05 +02:00
include Revert the behavior of inet/cidr functions to not unpack the arguments. 2011-12-12 10:05:15 +02:00
interfaces In ecpg removed old leftover check for given connection name. 2011-12-18 18:45:39 +01:00
makefiles Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS. 2011-08-24 15:17:03 -04:00
pl Translation updates 2011-12-01 23:03:05 +02:00
port Stamp 9.1.2. 2011-12-01 16:47:20 -05:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Fix gincostestimate to handle ScalarArrayOpExpr reasonably. 2011-12-20 19:57:40 -05:00
timezone Update time zone data files to tzdata release 2011n. 2011-11-30 11:48:21 -05:00
tools Fix MSVC builds broken by xsubpp change 2011-11-27 01:23:00 -05:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02: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 Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make distprep and *clean build targets recurse into all subdirectories. 2011-07-03 13:55:27 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:50 -04:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00