Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c321ce

Browse files
committed
Fix collate.windows.win1252 test.
Do not rely on the OS recognizing a particular locale; find the rightlocale by querying the "en_US" collation.Author: Alexander LakhinReported-by: Alexander LakhinDiscussion:https://postgr.es/m/ae73f6f5-8221-c112-4640-5cda812a69de@gmail.com
1 parentc538592 commit2c321ce

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

‎src/test/regress/expected/collate.windows.win1252.out

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,13 @@ drop type textrange_c;
992992
drop type textrange_en_us;
993993
-- nondeterministic collations
994994
-- (not supported with libc provider)
995-
CREATE COLLATION ctest_det (locale = 'en_US', deterministic = true);
995+
do $$
996+
BEGIN
997+
EXECUTE 'CREATE COLLATION ctest_det (locale = ' ||
998+
quote_literal((SELECT collcollate FROM pg_collation WHERE
999+
collname = 'en_US')) || ', deterministic = true);';
1000+
END
1001+
$$;
9961002
CREATE COLLATION ctest_nondet (locale = 'en_US', deterministic = false);
9971003
ERROR: nondeterministic collations not supported with this provider
9981004
-- cleanup

‎src/test/regress/sql/collate.windows.win1252.sql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,13 @@ drop type textrange_en_us;
400400

401401
-- nondeterministic collations
402402
-- (not supported with libc provider)
403-
404-
CREATE COLLATION ctest_det (locale='en_US', deterministic= true);
403+
do $$
404+
BEGIN
405+
EXECUTE'CREATE COLLATION ctest_det (locale ='||
406+
quote_literal((SELECT collcollateFROM pg_collationWHERE
407+
collname='en_US'))||', deterministic = true);';
408+
END
409+
$$;
405410
CREATE COLLATION ctest_nondet (locale='en_US', deterministic= false);
406411

407412

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp