File tree Expand file tree Collapse file tree 5 files changed +69
-0
lines changed
Expand file tree Collapse file tree 5 files changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ CREATE FUNCTION test_translation()
99-- There's less standardization in locale name spellings than one could wish.
1010-- While some platforms insist on having a codeset name in lc_messages,
1111-- fortunately it seems that it need not match the actual database encoding.
12+ -- However, if no es_ES locale is installed at all, this'll fail.
13+ SET lc_messages = 'C';
1214do $$
1315declare locale text; ok bool;
1416begin
2224 end;
2325 exit when ok;
2426 end loop;
27+ -- Don't clutter the expected results with this info, just log it
28+ raise log 'NLS regression test: lc_messages = %',
29+ current_setting('lc_messages');
2530end $$;
31+ SELECT current_setting('lc_messages') = 'C' AS failed \gset
32+ \if :failed
33+ \echo Could not find an acceptable spelling of es_ES locale
34+ \quit
35+ \endif
2636SELECT test_translation();
2737NOTICE: traducido PRId64 = 424242424242
2838NOTICE: traducido PRId32 = -1234
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ CREATE FUNCTION test_translation()
99-- There's less standardization in locale name spellings than one could wish.
1010-- While some platforms insist on having a codeset name in lc_messages,
1111-- fortunately it seems that it need not match the actual database encoding.
12+ -- However, if no es_ES locale is installed at all, this'll fail.
13+ SET lc_messages = 'C';
1214do $$
1315declare locale text; ok bool;
1416begin
2224 end;
2325 exit when ok;
2426 end loop;
27+ -- Don't clutter the expected results with this info, just log it
28+ raise log 'NLS regression test: lc_messages = %',
29+ current_setting('lc_messages');
2530end $$;
31+ SELECT current_setting('lc_messages') = 'C' AS failed \gset
32+ \if :failed
33+ \echo Could not find an acceptable spelling of es_ES locale
34+ \quit
35+ \endif
2636SELECT test_translation();
2737NOTICE: NLS is not enabled
2838 test_translation
Original file line number Diff line number Diff line change 1+ -- directory paths and dlsuffix are passed to us in environment variables
2+ \getenv libdir PG_LIBDIR
3+ \getenv dlsuffix PG_DLSUFFIX
4+ \set regresslib :libdir '/regress' :dlsuffix
5+ CREATE FUNCTION test_translation()
6+ RETURNS void
7+ AS :'regresslib'
8+ LANGUAGE C;
9+ -- There's less standardization in locale name spellings than one could wish.
10+ -- While some platforms insist on having a codeset name in lc_messages,
11+ -- fortunately it seems that it need not match the actual database encoding.
12+ -- However, if no es_ES locale is installed at all, this'll fail.
13+ SET lc_messages = 'C';
14+ do $$
15+ declare locale text; ok bool;
16+ begin
17+ for locale in values('es_ES'), ('es_ES.UTF-8'), ('es_ES.utf8')
18+ loop
19+ ok = true;
20+ begin
21+ execute format('set lc_messages = %L', locale);
22+ exception when invalid_parameter_value then
23+ ok = false;
24+ end;
25+ exit when ok;
26+ end loop;
27+ -- Don't clutter the expected results with this info, just log it
28+ raise log 'NLS regression test: lc_messages = %',
29+ current_setting('lc_messages');
30+ end $$;
31+ SELECT current_setting('lc_messages') = 'C' AS failed \gset
32+ \if :failed
33+ \echo Could not find an acceptable spelling of es_ES locale
34+ Could not find an acceptable spelling of es_ES locale
35+ \quit
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ CREATE FUNCTION test_translation()
1212-- There's less standardization in locale name spellings than one could wish.
1313-- While some platforms insist on having a codeset name in lc_messages,
1414-- fortunately it seems that it need not match the actual database encoding.
15+ -- However, if no es_ES locale is installed at all, this'll fail.
16+ SET lc_messages = ' C' ;
17+
1518do $$
1619declare locale text ; ok bool;
1720begin
2528 end;
2629 exit when ok;
2730 end loop;
31+ -- Don't clutter the expected results with this info, just log it
32+ raise log ' NLS regression test: lc_messages = %' ,
33+ current_setting(' lc_messages' );
2834end $$;
2935
36+ SELECT current_setting(' lc_messages' ) = ' C' AS failed \gset
37+ \if :failed
38+ \echo Could not find an acceptable spelling of es_ES locale
39+ \quit
40+ \endif
41+
3042SELECT test_translation();
3143
3244RESET lc_messages;
Original file line number Diff line number Diff line change @@ -3760,6 +3760,7 @@ int8x16_t
37603760int_fast32_t
37613761int_fast64_t
37623762internalPQconninfoOption
3763+ intmax_t
37633764intptr_t
37643765intset_internal_node
37653766intset_leaf_node
@@ -4214,6 +4215,7 @@ uint8
42144215uint8_t
42154216uint8x16_t
42164217uint_fast64_t
4218+ uintmax_t
42174219uintptr_t
42184220unicodeStyleBorderFormat
42194221unicodeStyleColumnFormat
You can’t perform that action at this time.
0 commit comments