aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-12-20 19:57:34 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-12-20 19:57:34 -0500
commit1db5af279441b9ee215b54de424c2af92eeb1ef8 (patch)
treef73b72cbc6920b1f8204c7a25e080069f8e6f622 /src/backend/tcop/postgres.c
parentd0024cd1881447fa7aed58db94df379e593c6630 (diff)
downloadpostgresql-1db5af279441b9ee215b54de424c2af92eeb1ef8.tar.gz
postgresql-1db5af279441b9ee215b54de424c2af92eeb1ef8.zip
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.
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions