From de5a08c59de39df07599723cb212ae8297903f48 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 12 Jan 2012 14:18:08 -0500 Subject: [PATCH] Tweak duplicate-index-column regression test to avoid locale sensitivity. The originally-chosen test case gives different results in es_EC locale because of unusual rule for sorting strings beginning with "LL". Adjust the comparison value to avoid that, while hopefully not introducing new locale dependencies elsewhere. Per report from Jaime Casanova. --- src/test/regress/expected/create_index.out | 8 ++++---- src/test/regress/sql/create_index.sql | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index 3be20168f8..b1fcada1be 100644 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -2468,18 +2468,18 @@ CREATE INDEX dupindexcols_i ON dupindexcols (f1, id, f1 text_pattern_ops); VACUUM ANALYZE dupindexcols; EXPLAIN (COSTS OFF) SELECT count(*) FROM dupindexcols - WHERE f1 > 'LX' and id < 1000 and f1 ~<~ 'YX'; + WHERE f1 > 'MA' and id < 1000 and f1 ~<~ 'YX'; QUERY PLAN --------------------------------------------------------------------------------- Aggregate -> Index Only Scan using dupindexcols_i on dupindexcols - Index Cond: ((f1 > 'LX'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text)) + Index Cond: ((f1 > 'MA'::text) AND (id < 1000) AND (f1 ~<~ 'YX'::text)) (3 rows) SELECT count(*) FROM dupindexcols - WHERE f1 > 'LX' and id < 1000 and f1 ~<~ 'YX'; + WHERE f1 > 'MA' and id < 1000 and f1 ~<~ 'YX'; count ------- - 500 + 497 (1 row) diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql index 6d25ff9c46..5e5fc22579 100644 --- a/src/test/regress/sql/create_index.sql +++ b/src/test/regress/sql/create_index.sql @@ -816,6 +816,6 @@ VACUUM ANALYZE dupindexcols; EXPLAIN (COSTS OFF) SELECT count(*) FROM dupindexcols - WHERE f1 > 'LX' and id < 1000 and f1 ~<~ 'YX'; + WHERE f1 > 'MA' and id < 1000 and f1 ~<~ 'YX'; SELECT count(*) FROM dupindexcols - WHERE f1 > 'LX' and id < 1000 and f1 ~<~ 'YX'; + WHERE f1 > 'MA' and id < 1000 and f1 ~<~ 'YX';