Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2022-01-03 21:12:11 +0000
committerTom Lane2022-01-03 21:12:11 +0000
commit8a2e323f208557acbfdc911516e84ec017f5a6ca (patch)
tree4c10dcd4d9d3f8a0d3528bd8125a1a104f0c17d2 /contrib/btree_gist/sql
parent9a3ddeb519e8d91b670fa923619b212a9670389c (diff)
Handle mixed returnable and non-returnable columns better in IOS.
We can revert the code changes of commit b5febc1d1 now, because commit 9a3ddeb51 installed a real solution for the difficulty that b5febc1d1 just dodged, namely that the planner might pick the wrong one of several index columns nominally containing the same value. It only matters which one we pick if we pick one that's not returnable, and that mistake is now foreclosed. Although both of the aforementioned commits were back-patched, I don't feel a need to take any risk by back-patching this one. The cases that it improves are very corner-ish. Discussion: https://postgr.es/m/3179992.1641150853@sss.pgh.pa.us
Diffstat (limited to 'contrib/btree_gist/sql')
-rw-r--r--contrib/btree_gist/sql/inet.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/btree_gist/sql/inet.sql b/contrib/btree_gist/sql/inet.sql
index 4b8d354b00e..249e8085c3b 100644
--- a/contrib/btree_gist/sql/inet.sql
+++ b/contrib/btree_gist/sql/inet.sql
@@ -42,7 +42,7 @@ DROP INDEX inetidx;
CREATE INDEX ON inettmp USING gist (a gist_inet_ops, a inet_ops);
--- likewise here (checks for core planner bug)
+-- this can be an index-only scan, as long as the planner uses the right column
EXPLAIN (COSTS OFF)
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;