postgresql/src/test
Tom Lane 1db5af2794 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:34 -05:00
..
examples Capitalization fixes 2011-06-19 00:37:30 +03:00
isolation Unbreak isolationtester on Win32 2011-11-04 00:33:48 -02:00
locale Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
mb Minor improvements to mbregress.sh script. 2011-09-01 09:21:10 -04:00
performance Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
regress Fix gincostestimate to handle ScalarArrayOpExpr reasonably. 2011-12-20 19:57:34 -05:00
thread Properly call strerror() in thread test; add comments. 2011-08-22 09:04:48 -04:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00