File: citext_utf8_1.out

package info (click to toggle)
postgresql-18 18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156,336 kB
  • sloc: ansic: 993,549; sql: 127,589; perl: 59,056; xml: 30,905; yacc: 21,023; lex: 9,000; makefile: 6,881; sh: 5,354; cpp: 988; python: 710; asm: 40; sed: 3
file content (19 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * This test must be run in a database with UTF-8 encoding
 * and a Unicode-aware locale.
 *
 * Also disable this file for ICU, because the test for the
 * Turkish dotted I is not correct for many ICU locales. citext always
 * uses the default collation, so it's not easy to restrict the test
 * to the "tr-TR-x-icu" collation where it will succeed.
 *
 * Also disable for Windows.  It fails similarly, at least in some locales.
 */
SELECT getdatabaseencoding() <> 'UTF8' OR
       version() ~ '(Visual C\+\+|mingw32|windows)' OR
       (SELECT (datlocprovider = 'c' AND datctype = 'C') OR datlocprovider = 'i'
        FROM pg_database
        WHERE datname=current_database())
       AS skip_test \gset
\if :skip_test
\quit