mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Fix collate.windows.win1252 test.
Do not rely on the OS recognizing a particular locale; find the right locale by querying the "en_US" collation. Author: Alexander Lakhin Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/ae73f6f5-8221-c112-4640-5cda812a69de@gmail.com
This commit is contained in:
parent
c538592959
commit
2c321ceaa9
@ -992,7 +992,13 @@ drop type textrange_c;
|
||||
drop type textrange_en_us;
|
||||
-- nondeterministic collations
|
||||
-- (not supported with libc provider)
|
||||
CREATE COLLATION ctest_det (locale = 'en_US', deterministic = true);
|
||||
do $$
|
||||
BEGIN
|
||||
EXECUTE 'CREATE COLLATION ctest_det (locale = ' ||
|
||||
quote_literal((SELECT collcollate FROM pg_collation WHERE
|
||||
collname = 'en_US')) || ', deterministic = true);';
|
||||
END
|
||||
$$;
|
||||
CREATE COLLATION ctest_nondet (locale = 'en_US', deterministic = false);
|
||||
ERROR: nondeterministic collations not supported with this provider
|
||||
-- cleanup
|
||||
|
@ -400,8 +400,13 @@ drop type textrange_en_us;
|
||||
|
||||
-- nondeterministic collations
|
||||
-- (not supported with libc provider)
|
||||
|
||||
CREATE COLLATION ctest_det (locale = 'en_US', deterministic = true);
|
||||
do $$
|
||||
BEGIN
|
||||
EXECUTE 'CREATE COLLATION ctest_det (locale = ' ||
|
||||
quote_literal((SELECT collcollate FROM pg_collation WHERE
|
||||
collname = 'en_US')) || ', deterministic = true);';
|
||||
END
|
||||
$$;
|
||||
CREATE COLLATION ctest_nondet (locale = 'en_US', deterministic = false);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user