summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Grittner2013-06-19 15:36:45 +0000
committerKevin Grittner2013-06-19 15:36:45 +0000
commit8791627b8f9a9ce44603beec447bc6f18bfd9a36 (patch)
treebc8f5f243e2969602f3ab53601e386fed865b5cf
parent073d7cb513f5de44530f4bdbaaa4b5d4cce5f984 (diff)
Fix the create_index regression test for Danish collation.
In Danish collations, there are letter combinations which sort higher than 'Z'. A test for values > 'WA' was picking up rows where the value started with 'AA', causing the test to fail. Backpatch to 9.2, where the failing test was added. Per report from Svenne Krap and analysis by Jeff Janes
-rw-r--r--src/test/regress/expected/create_index.out12
-rw-r--r--src/test/regress/sql/create_index.sql4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index ad3a678cb22..37dea0a5544 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2659,18 +2659,18 @@ CREATE INDEX dupindexcols_i ON dupindexcols (f1, id, f1 text_pattern_ops);
ANALYZE dupindexcols;
EXPLAIN (COSTS OFF)
SELECT count(*) FROM dupindexcols
- WHERE f1 > 'WA' and id < 1000 and f1 ~<~ 'YX';
- QUERY PLAN
----------------------------------------------------------------------------------------
+ WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX';
+ QUERY PLAN
+----------------------------------------------------------------------------------------------------------------
Aggregate
-> Bitmap Heap Scan on dupindexcols
- Recheck Cond: ((f1 > 'WA'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text))
+ Recheck Cond: ((f1 >= 'WA'::text) AND (f1 <= 'ZZZ'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text))
-> Bitmap Index Scan on dupindexcols_i
- Index Cond: ((f1 > 'WA'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text))
+ Index Cond: ((f1 >= 'WA'::text) AND (f1 <= 'ZZZ'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text))
(5 rows)
SELECT count(*) FROM dupindexcols
- WHERE f1 > 'WA' and id < 1000 and f1 ~<~ 'YX';
+ WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX';
count
-------
97
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index 04b69c67db6..d025cbcb5e4 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -885,9 +885,9 @@ ANALYZE dupindexcols;
EXPLAIN (COSTS OFF)
SELECT count(*) FROM dupindexcols
- WHERE f1 > 'WA' and id < 1000 and f1 ~<~ 'YX';
+ WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX';
SELECT count(*) FROM dupindexcols
- WHERE f1 > 'WA' and id < 1000 and f1 ~<~ 'YX';
+ WHERE f1 BETWEEN 'WA' AND 'ZZZ' and id < 1000 and f1 ~<~ 'YX';
--
-- Check ordering of =ANY indexqual results (bug in 9.2.0)