1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Make contrib regression tests safe for Danish locale.

In btree_gin and citext, avoid some not-particularly-interesting
dependencies on the sorting of 'aa'.  In tsearch2, use COLLATE "C" to
remove an uninteresting dependency on locale sort order (and thereby
allow removal of a variant expected-file).

Also, in citext, avoid assuming that lower('I') = 'i'.  This isn't relevant
to Danish but it does fail in Turkish.
This commit is contained in:
Tom Lane
2016-07-21 16:52:36 -04:00
parent 0060638c87
commit e15e7886e6
12 changed files with 271 additions and 3311 deletions

View File

@ -1067,7 +1067,7 @@ select rank(' a:1 s:2 d g'::tsvector, 'a & s');
insert into test_tsvector (t) values ('foo bar foo the over foo qq bar');
drop trigger tsvectorupdate on test_tsvector;
select * from stat('select a from test_tsvector') order by ndoc desc, nentry desc, word;
select * from stat('select a from test_tsvector') order by ndoc desc, nentry desc, word collate "C";
word | ndoc | nentry
-----------+------+--------
qq | 109 | 109
@ -2220,28 +2220,28 @@ select * from stat('select a from test_tsvector') order by ndoc desc, nentry des
insert into test_tsvector values ('1', 'a:1a,2,3b b:5a,6a,7c,8');
insert into test_tsvector values ('1', 'a:1a,2,3c b:5a,6b,7c,8b');
select * from stat('select a from test_tsvector','a') order by ndoc desc, nentry desc, word;
select * from stat('select a from test_tsvector','a') order by ndoc desc, nentry desc, word collate "C";
word | ndoc | nentry
------+------+--------
b | 2 | 3
a | 2 | 2
(2 rows)
select * from stat('select a from test_tsvector','b') order by ndoc desc, nentry desc, word;
select * from stat('select a from test_tsvector','b') order by ndoc desc, nentry desc, word collate "C";
word | ndoc | nentry
------+------+--------
b | 1 | 2
a | 1 | 1
(2 rows)
select * from stat('select a from test_tsvector','c') order by ndoc desc, nentry desc, word;
select * from stat('select a from test_tsvector','c') order by ndoc desc, nentry desc, word collate "C";
word | ndoc | nentry
------+------+--------
b | 2 | 2
a | 1 | 1
(2 rows)
select * from stat('select a from test_tsvector','d') order by ndoc desc, nentry desc, word;
select * from stat('select a from test_tsvector','d') order by ndoc desc, nentry desc, word collate "C";
word | ndoc | nentry
-----------+------+--------
a | 2 | 2
@ -2254,7 +2254,7 @@ select * from stat('select a from test_tsvector','d') order by ndoc desc, nentry
qwerti | 1 | 1
(8 rows)
select * from stat('select a from test_tsvector','ad') order by ndoc desc, nentry desc, word;
select * from stat('select a from test_tsvector','ad') order by ndoc desc, nentry desc, word collate "C";
word | ndoc | nentry
-----------+------+--------
a | 2 | 4

File diff suppressed because it is too large Load Diff