Remove unnecessary and problematic collate.windows.win1252 tests
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 28 Feb 2023 20:47:07 +0000 (15:47 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 28 Feb 2023 20:47:07 +0000 (15:47 -0500)
Some windows instances can't handle setting lc_time to a non BCP 47
locale, and the removed tests in any case don't really make lots of
sense here.

Juan José Santamaría Flecha

Discussion: https://postgr.es/m/237b255b-e063-a82e-66e1-c63a12bf9664@dunslane.net

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

index 4d538f2123044502dacc35cc9b1c809fa0a6e85b..61b421161fa49ed5084a9a31a11081a27a63e8f4 100644 (file)
@@ -361,30 +361,6 @@ SELECT relname FROM pg_class WHERE relname ~* '^abc';
 ---------
 (0 rows)
 
--- to_char
-SET lc_time TO 'de_DE';
-SELECT to_char(date '2010-03-01', 'DD TMMON YYYY');
-   to_char
--------------
- 01 MRZ 2010
-(1 row)
-
-SELECT to_char(date '2010-03-01', 'DD TMMON YYYY' COLLATE "de_DE");
-   to_char
--------------
- 01 MRZ 2010
-(1 row)
-
--- to_date
-SELECT to_date('01 MÄR 2010', 'DD TMMON YYYY');
-ERROR:  invalid value "MÄR" for "MON"
-DETAIL:  The given value did not match any of the allowed values for this field.
-SELECT to_date('01 Mär 2010', 'DD TMMON YYYY');
-ERROR:  invalid value "Mär" for "MON"
-DETAIL:  The given value did not match any of the allowed values for this field.
-SELECT to_date('1234567890ab 2010', 'TMMONTH YYYY'); -- fail
-ERROR:  invalid value "1234567890ab" for "MONTH"
-DETAIL:  The given value did not match any of the allowed values for this field.
 -- backwards parsing
 CREATE VIEW collview1 AS SELECT * FROM collate_test1 WHERE b COLLATE "C" >= 'bbc';
 CREATE VIEW collview2 AS SELECT a, b FROM collate_test1 ORDER BY b COLLATE "C";
index 64f5ef9b97aff2fc05fc9f0db407f99dd78a0f8f..b5c45e1810393f09a3a467f359c6848344c4c91f 100644 (file)
@@ -150,19 +150,6 @@ FROM collate_test6;
 SELECT relname FROM pg_class WHERE relname ~* '^abc';
 
 
--- to_char
-
-SET lc_time TO 'de_DE';
-SELECT to_char(date '2010-03-01', 'DD TMMON YYYY');
-SELECT to_char(date '2010-03-01', 'DD TMMON YYYY' COLLATE "de_DE");
-
--- to_date
-
-SELECT to_date('01 MÄR 2010', 'DD TMMON YYYY');
-SELECT to_date('01 Mär 2010', 'DD TMMON YYYY');
-SELECT to_date('1234567890ab 2010', 'TMMONTH YYYY'); -- fail
-
-
 -- backwards parsing
 
 CREATE VIEW collview1 AS SELECT * FROM collate_test1 WHERE b COLLATE "C" >= 'bbc';