summaryrefslogtreecommitdiff
path: root/src/test/regress/sql/gist.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/sql/gist.sql')
-rw-r--r--src/test/regress/sql/gist.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/regress/sql/gist.sql b/src/test/regress/sql/gist.sql
index 657b1954847..cd6715f0b8d 100644
--- a/src/test/regress/sql/gist.sql
+++ b/src/test/regress/sql/gist.sql
@@ -126,6 +126,17 @@ and p <@ box(point(5,5), point(6, 6));
drop index gist_tbl_multi_index;
+-- Test that we don't try to return the value of a non-returnable
+-- column in an index-only scan. (This isn't GIST-specific, but
+-- it only applies to index AMs that can return some columns and not
+-- others, so GIST with appropriate opclasses is a convenient test case.)
+create index gist_tbl_multi_index on gist_tbl using gist (circle(p,1), p);
+explain (verbose, costs off)
+select circle(p,1) from gist_tbl
+where p <@ box(point(5, 5), point(5.3, 5.3));
+select circle(p,1) from gist_tbl
+where p <@ box(point(5, 5), point(5.3, 5.3));
+
-- Clean up
reset enable_seqscan;
reset enable_bitmapscan;