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

Commit71936fc

Browse files
committed
The Czech (cs_CZ) and Slovak (sk_SK) locales sort numbers after letters,
instead of vice versa. Update the regression test expectations to supportthat. In the plpgsql test, adjust the test data so that this isn't anissue. In the char and varchar tests, add new expected files.
1 parentc1c1886 commit71936fc

File tree

4 files changed

+391
-158
lines changed

4 files changed

+391
-158
lines changed

‎src/test/regress/expected/char_2.out

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
--
2+
-- CHAR
3+
--
4+
-- fixed-length by value
5+
-- internally passed by value if <= 4 bytes in storage
6+
SELECT char 'c' = char 'c' AS true;
7+
true
8+
------
9+
t
10+
(1 row)
11+
12+
--
13+
-- Build a table for testing
14+
--
15+
CREATE TABLE CHAR_TBL(f1 char);
16+
INSERT INTO CHAR_TBL (f1) VALUES ('a');
17+
INSERT INTO CHAR_TBL (f1) VALUES ('A');
18+
-- any of the following three input formats are acceptable
19+
INSERT INTO CHAR_TBL (f1) VALUES ('1');
20+
INSERT INTO CHAR_TBL (f1) VALUES (2);
21+
INSERT INTO CHAR_TBL (f1) VALUES ('3');
22+
-- zero-length char
23+
INSERT INTO CHAR_TBL (f1) VALUES ('');
24+
-- try char's of greater than 1 length
25+
INSERT INTO CHAR_TBL (f1) VALUES ('cd');
26+
ERROR: value too long for type character(1)
27+
INSERT INTO CHAR_TBL (f1) VALUES ('c ');
28+
SELECT '' AS seven, * FROM CHAR_TBL;
29+
seven | f1
30+
-------+----
31+
| a
32+
| A
33+
| 1
34+
| 2
35+
| 3
36+
|
37+
| c
38+
(7 rows)
39+
40+
SELECT '' AS six, c.*
41+
FROM CHAR_TBL c
42+
WHERE c.f1 <> 'a';
43+
six | f1
44+
-----+----
45+
| A
46+
| 1
47+
| 2
48+
| 3
49+
|
50+
| c
51+
(6 rows)
52+
53+
SELECT '' AS one, c.*
54+
FROM CHAR_TBL c
55+
WHERE c.f1 = 'a';
56+
one | f1
57+
-----+----
58+
| a
59+
(1 row)
60+
61+
SELECT '' AS five, c.*
62+
FROM CHAR_TBL c
63+
WHERE c.f1 < 'a';
64+
five | f1
65+
------+----
66+
|
67+
(1 row)
68+
69+
SELECT '' AS six, c.*
70+
FROM CHAR_TBL c
71+
WHERE c.f1 <= 'a';
72+
six | f1
73+
-----+----
74+
| a
75+
|
76+
(2 rows)
77+
78+
SELECT '' AS one, c.*
79+
FROM CHAR_TBL c
80+
WHERE c.f1 > 'a';
81+
one | f1
82+
-----+----
83+
| A
84+
| 1
85+
| 2
86+
| 3
87+
| c
88+
(5 rows)
89+
90+
SELECT '' AS two, c.*
91+
FROM CHAR_TBL c
92+
WHERE c.f1 >= 'a';
93+
two | f1
94+
-----+----
95+
| a
96+
| A
97+
| 1
98+
| 2
99+
| 3
100+
| c
101+
(6 rows)
102+
103+
DROP TABLE CHAR_TBL;
104+
--
105+
-- Now test longer arrays of char
106+
--
107+
CREATE TABLE CHAR_TBL(f1 char(4));
108+
INSERT INTO CHAR_TBL (f1) VALUES ('a');
109+
INSERT INTO CHAR_TBL (f1) VALUES ('ab');
110+
INSERT INTO CHAR_TBL (f1) VALUES ('abcd');
111+
INSERT INTO CHAR_TBL (f1) VALUES ('abcde');
112+
ERROR: value too long for type character(4)
113+
INSERT INTO CHAR_TBL (f1) VALUES ('abcd ');
114+
SELECT '' AS four, * FROM CHAR_TBL;
115+
four | f1
116+
------+------
117+
| a
118+
| ab
119+
| abcd
120+
| abcd
121+
(4 rows)
122+

‎src/test/regress/expected/plpgsql.out

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,31 +1113,31 @@ insert into PSlot values ('PS.base.tb3', 'PF0_X', '', '');
11131113
insert into PSlot values ('PS.base.tb4', 'PF0_X', '', '');
11141114
insert into PSlot values ('PS.base.tb5', 'PF0_X', '', '');
11151115
insert into PSlot values ('PS.base.tb6', 'PF0_X', '', '');
1116-
insert into PField values ('PF1_1', 'Wallslots1st floor');
1117-
insert into PSlot values ('PS.1st.a1', 'PF1_1', '', 'WS.101.1a');
1118-
insert into PSlot values ('PS.1st.a2', 'PF1_1', '', 'WS.101.1b');
1119-
insert into PSlot values ('PS.1st.a3', 'PF1_1', '', 'WS.101.2a');
1120-
insert into PSlot values ('PS.1st.a4', 'PF1_1', '', 'WS.101.2b');
1121-
insert into PSlot values ('PS.1st.a5', 'PF1_1', '', 'WS.101.3a');
1122-
insert into PSlot values ('PS.1st.a6', 'PF1_1', '', 'WS.101.3b');
1123-
insert into PSlot values ('PS.1st.b1', 'PF1_1', '', 'WS.102.1a');
1124-
insert into PSlot values ('PS.1st.b2', 'PF1_1', '', 'WS.102.1b');
1125-
insert into PSlot values ('PS.1st.b3', 'PF1_1', '', 'WS.102.2a');
1126-
insert into PSlot values ('PS.1st.b4', 'PF1_1', '', 'WS.102.2b');
1127-
insert into PSlot values ('PS.1st.b5', 'PF1_1', '', 'WS.102.3a');
1128-
insert into PSlot values ('PS.1st.b6', 'PF1_1', '', 'WS.102.3b');
1129-
insert into PSlot values ('PS.1st.c1', 'PF1_1', '', 'WS.105.1a');
1130-
insert into PSlot values ('PS.1st.c2', 'PF1_1', '', 'WS.105.1b');
1131-
insert into PSlot values ('PS.1st.c3', 'PF1_1', '', 'WS.105.2a');
1132-
insert into PSlot values ('PS.1st.c4', 'PF1_1', '', 'WS.105.2b');
1133-
insert into PSlot values ('PS.1st.c5', 'PF1_1', '', 'WS.105.3a');
1134-
insert into PSlot values ('PS.1st.c6', 'PF1_1', '', 'WS.105.3b');
1135-
insert into PSlot values ('PS.1st.d1', 'PF1_1', '', 'WS.106.1a');
1136-
insert into PSlot values ('PS.1st.d2', 'PF1_1', '', 'WS.106.1b');
1137-
insert into PSlot values ('PS.1st.d3', 'PF1_1', '', 'WS.106.2a');
1138-
insert into PSlot values ('PS.1st.d4', 'PF1_1', '', 'WS.106.2b');
1139-
insert into PSlot values ('PS.1st.d5', 'PF1_1', '', 'WS.106.3a');
1140-
insert into PSlot values ('PS.1st.d6', 'PF1_1', '', 'WS.106.3b');
1116+
insert into PField values ('PF1_1', 'Wallslotsfirst floor');
1117+
insert into PSlot values ('PS.first.a1', 'PF1_1', '', 'WS.101.1a');
1118+
insert into PSlot values ('PS.first.a2', 'PF1_1', '', 'WS.101.1b');
1119+
insert into PSlot values ('PS.first.a3', 'PF1_1', '', 'WS.101.2a');
1120+
insert into PSlot values ('PS.first.a4', 'PF1_1', '', 'WS.101.2b');
1121+
insert into PSlot values ('PS.first.a5', 'PF1_1', '', 'WS.101.3a');
1122+
insert into PSlot values ('PS.first.a6', 'PF1_1', '', 'WS.101.3b');
1123+
insert into PSlot values ('PS.first.b1', 'PF1_1', '', 'WS.102.1a');
1124+
insert into PSlot values ('PS.first.b2', 'PF1_1', '', 'WS.102.1b');
1125+
insert into PSlot values ('PS.first.b3', 'PF1_1', '', 'WS.102.2a');
1126+
insert into PSlot values ('PS.first.b4', 'PF1_1', '', 'WS.102.2b');
1127+
insert into PSlot values ('PS.first.b5', 'PF1_1', '', 'WS.102.3a');
1128+
insert into PSlot values ('PS.first.b6', 'PF1_1', '', 'WS.102.3b');
1129+
insert into PSlot values ('PS.first.c1', 'PF1_1', '', 'WS.105.1a');
1130+
insert into PSlot values ('PS.first.c2', 'PF1_1', '', 'WS.105.1b');
1131+
insert into PSlot values ('PS.first.c3', 'PF1_1', '', 'WS.105.2a');
1132+
insert into PSlot values ('PS.first.c4', 'PF1_1', '', 'WS.105.2b');
1133+
insert into PSlot values ('PS.first.c5', 'PF1_1', '', 'WS.105.3a');
1134+
insert into PSlot values ('PS.first.c6', 'PF1_1', '', 'WS.105.3b');
1135+
insert into PSlot values ('PS.first.d1', 'PF1_1', '', 'WS.106.1a');
1136+
insert into PSlot values ('PS.first.d2', 'PF1_1', '', 'WS.106.1b');
1137+
insert into PSlot values ('PS.first.d3', 'PF1_1', '', 'WS.106.2a');
1138+
insert into PSlot values ('PS.first.d4', 'PF1_1', '', 'WS.106.2b');
1139+
insert into PSlot values ('PS.first.d5', 'PF1_1', '', 'WS.106.3a');
1140+
insert into PSlot values ('PS.first.d6', 'PF1_1', '', 'WS.106.3b');
11411141
--
11421142
-- Now we wire the wall connectors 1a-2a in room 001 to the
11431143
-- patchfield. In the second update we make an error, and
@@ -1288,62 +1288,26 @@ select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
12881288
PS.base.a6 | PF0_1 | | WS.001.3b
12891289
(6 rows)
12901290

1291-
insert into PField values ('PF1_2', 'Phonelines1st floor');
1292-
insert into PSlot values ('PS.1st.ta1', 'PF1_2', '', '');
1293-
insert into PSlot values ('PS.1st.ta2', 'PF1_2', '', '');
1294-
insert into PSlot values ('PS.1st.ta3', 'PF1_2', '', '');
1295-
insert into PSlot values ('PS.1st.ta4', 'PF1_2', '', '');
1296-
insert into PSlot values ('PS.1st.ta5', 'PF1_2', '', '');
1297-
insert into PSlot values ('PS.1st.ta6', 'PF1_2', '', '');
1298-
insert into PSlot values ('PS.1st.tb1', 'PF1_2', '', '');
1299-
insert into PSlot values ('PS.1st.tb2', 'PF1_2', '', '');
1300-
insert into PSlot values ('PS.1st.tb3', 'PF1_2', '', '');
1301-
insert into PSlot values ('PS.1st.tb4', 'PF1_2', '', '');
1302-
insert into PSlot values ('PS.1st.tb5', 'PF1_2', '', '');
1303-
insert into PSlot values ('PS.1st.tb6', 'PF1_2', '', '');
1291+
insert into PField values ('PF1_2', 'Phonelinesfirst floor');
1292+
insert into PSlot values ('PS.first.ta1', 'PF1_2', '', '');
1293+
insert into PSlot values ('PS.first.ta2', 'PF1_2', '', '');
1294+
insert into PSlot values ('PS.first.ta3', 'PF1_2', '', '');
1295+
insert into PSlot values ('PS.first.ta4', 'PF1_2', '', '');
1296+
insert into PSlot values ('PS.first.ta5', 'PF1_2', '', '');
1297+
insert into PSlot values ('PS.first.ta6', 'PF1_2', '', '');
1298+
insert into PSlot values ('PS.first.tb1', 'PF1_2', '', '');
1299+
insert into PSlot values ('PS.first.tb2', 'PF1_2', '', '');
1300+
insert into PSlot values ('PS.first.tb3', 'PF1_2', '', '');
1301+
insert into PSlot values ('PS.first.tb4', 'PF1_2', '', '');
1302+
insert into PSlot values ('PS.first.tb5', 'PF1_2', '', '');
1303+
insert into PSlot values ('PS.first.tb6', 'PF1_2', '', '');
13041304
--
13051305
-- Fix the wrong name for patchfield PF0_2
13061306
--
13071307
update PField set name = 'PF0_2' where name = 'PF0_X';
13081308
select * from PSlot order by slotname;
13091309
slotname | pfname | slotlink | backlink
13101310
----------------------+--------+----------------------+----------------------
1311-
PS.1st.a1 | PF1_1 | | WS.101.1a
1312-
PS.1st.a2 | PF1_1 | | WS.101.1b
1313-
PS.1st.a3 | PF1_1 | | WS.101.2a
1314-
PS.1st.a4 | PF1_1 | | WS.101.2b
1315-
PS.1st.a5 | PF1_1 | | WS.101.3a
1316-
PS.1st.a6 | PF1_1 | | WS.101.3b
1317-
PS.1st.b1 | PF1_1 | | WS.102.1a
1318-
PS.1st.b2 | PF1_1 | | WS.102.1b
1319-
PS.1st.b3 | PF1_1 | | WS.102.2a
1320-
PS.1st.b4 | PF1_1 | | WS.102.2b
1321-
PS.1st.b5 | PF1_1 | | WS.102.3a
1322-
PS.1st.b6 | PF1_1 | | WS.102.3b
1323-
PS.1st.c1 | PF1_1 | | WS.105.1a
1324-
PS.1st.c2 | PF1_1 | | WS.105.1b
1325-
PS.1st.c3 | PF1_1 | | WS.105.2a
1326-
PS.1st.c4 | PF1_1 | | WS.105.2b
1327-
PS.1st.c5 | PF1_1 | | WS.105.3a
1328-
PS.1st.c6 | PF1_1 | | WS.105.3b
1329-
PS.1st.d1 | PF1_1 | | WS.106.1a
1330-
PS.1st.d2 | PF1_1 | | WS.106.1b
1331-
PS.1st.d3 | PF1_1 | | WS.106.2a
1332-
PS.1st.d4 | PF1_1 | | WS.106.2b
1333-
PS.1st.d5 | PF1_1 | | WS.106.3a
1334-
PS.1st.d6 | PF1_1 | | WS.106.3b
1335-
PS.1st.ta1 | PF1_2 | |
1336-
PS.1st.ta2 | PF1_2 | |
1337-
PS.1st.ta3 | PF1_2 | |
1338-
PS.1st.ta4 | PF1_2 | |
1339-
PS.1st.ta5 | PF1_2 | |
1340-
PS.1st.ta6 | PF1_2 | |
1341-
PS.1st.tb1 | PF1_2 | |
1342-
PS.1st.tb2 | PF1_2 | |
1343-
PS.1st.tb3 | PF1_2 | |
1344-
PS.1st.tb4 | PF1_2 | |
1345-
PS.1st.tb5 | PF1_2 | |
1346-
PS.1st.tb6 | PF1_2 | |
13471311
PS.base.a1 | PF0_1 | | WS.001.1a
13481312
PS.base.a2 | PF0_1 | | WS.001.1b
13491313
PS.base.a3 | PF0_1 | | WS.001.2a
@@ -1374,6 +1338,42 @@ select * from PSlot order by slotname;
13741338
PS.base.tb4 | PF0_2 | |
13751339
PS.base.tb5 | PF0_2 | |
13761340
PS.base.tb6 | PF0_2 | |
1341+
PS.first.a1 | PF1_1 | | WS.101.1a
1342+
PS.first.a2 | PF1_1 | | WS.101.1b
1343+
PS.first.a3 | PF1_1 | | WS.101.2a
1344+
PS.first.a4 | PF1_1 | | WS.101.2b
1345+
PS.first.a5 | PF1_1 | | WS.101.3a
1346+
PS.first.a6 | PF1_1 | | WS.101.3b
1347+
PS.first.b1 | PF1_1 | | WS.102.1a
1348+
PS.first.b2 | PF1_1 | | WS.102.1b
1349+
PS.first.b3 | PF1_1 | | WS.102.2a
1350+
PS.first.b4 | PF1_1 | | WS.102.2b
1351+
PS.first.b5 | PF1_1 | | WS.102.3a
1352+
PS.first.b6 | PF1_1 | | WS.102.3b
1353+
PS.first.c1 | PF1_1 | | WS.105.1a
1354+
PS.first.c2 | PF1_1 | | WS.105.1b
1355+
PS.first.c3 | PF1_1 | | WS.105.2a
1356+
PS.first.c4 | PF1_1 | | WS.105.2b
1357+
PS.first.c5 | PF1_1 | | WS.105.3a
1358+
PS.first.c6 | PF1_1 | | WS.105.3b
1359+
PS.first.d1 | PF1_1 | | WS.106.1a
1360+
PS.first.d2 | PF1_1 | | WS.106.1b
1361+
PS.first.d3 | PF1_1 | | WS.106.2a
1362+
PS.first.d4 | PF1_1 | | WS.106.2b
1363+
PS.first.d5 | PF1_1 | | WS.106.3a
1364+
PS.first.d6 | PF1_1 | | WS.106.3b
1365+
PS.first.ta1 | PF1_2 | |
1366+
PS.first.ta2 | PF1_2 | |
1367+
PS.first.ta3 | PF1_2 | |
1368+
PS.first.ta4 | PF1_2 | |
1369+
PS.first.ta5 | PF1_2 | |
1370+
PS.first.ta6 | PF1_2 | |
1371+
PS.first.tb1 | PF1_2 | |
1372+
PS.first.tb2 | PF1_2 | |
1373+
PS.first.tb3 | PF1_2 | |
1374+
PS.first.tb4 | PF1_2 | |
1375+
PS.first.tb5 | PF1_2 | |
1376+
PS.first.tb6 | PF1_2 | |
13771377
(66 rows)
13781378

13791379
select * from WSlot order by slotname;
@@ -1397,30 +1397,30 @@ select * from WSlot order by slotname;
13971397
WS.003.2b | 003 | | PS.base.c4
13981398
WS.003.3a | 003 | | PS.base.c5
13991399
WS.003.3b | 003 | | PS.base.c6
1400-
WS.101.1a | 101 | | PS.1st.a1
1401-
WS.101.1b | 101 | | PS.1st.a2
1402-
WS.101.2a | 101 | | PS.1st.a3
1403-
WS.101.2b | 101 | | PS.1st.a4
1404-
WS.101.3a | 101 | | PS.1st.a5
1405-
WS.101.3b | 101 | | PS.1st.a6
1406-
WS.102.1a | 102 | | PS.1st.b1
1407-
WS.102.1b | 102 | | PS.1st.b2
1408-
WS.102.2a | 102 | | PS.1st.b3
1409-
WS.102.2b | 102 | | PS.1st.b4
1410-
WS.102.3a | 102 | | PS.1st.b5
1411-
WS.102.3b | 102 | | PS.1st.b6
1412-
WS.105.1a | 105 | | PS.1st.c1
1413-
WS.105.1b | 105 | | PS.1st.c2
1414-
WS.105.2a | 105 | | PS.1st.c3
1415-
WS.105.2b | 105 | | PS.1st.c4
1416-
WS.105.3a | 105 | | PS.1st.c5
1417-
WS.105.3b | 105 | | PS.1st.c6
1418-
WS.106.1a | 106 | | PS.1st.d1
1419-
WS.106.1b | 106 | | PS.1st.d2
1420-
WS.106.2a | 106 | | PS.1st.d3
1421-
WS.106.2b | 106 | | PS.1st.d4
1422-
WS.106.3a | 106 | | PS.1st.d5
1423-
WS.106.3b | 106 | | PS.1st.d6
1400+
WS.101.1a | 101 | | PS.first.a1
1401+
WS.101.1b | 101 | | PS.first.a2
1402+
WS.101.2a | 101 | | PS.first.a3
1403+
WS.101.2b | 101 | | PS.first.a4
1404+
WS.101.3a | 101 | | PS.first.a5
1405+
WS.101.3b | 101 | | PS.first.a6
1406+
WS.102.1a | 102 | | PS.first.b1
1407+
WS.102.1b | 102 | | PS.first.b2
1408+
WS.102.2a | 102 | | PS.first.b3
1409+
WS.102.2b | 102 | | PS.first.b4
1410+
WS.102.3a | 102 | | PS.first.b5
1411+
WS.102.3b | 102 | | PS.first.b6
1412+
WS.105.1a | 105 | | PS.first.c1
1413+
WS.105.1b | 105 | | PS.first.c2
1414+
WS.105.2a | 105 | | PS.first.c3
1415+
WS.105.2b | 105 | | PS.first.c4
1416+
WS.105.3a | 105 | | PS.first.c5
1417+
WS.105.3b | 105 | | PS.first.c6
1418+
WS.106.1a | 106 | | PS.first.d1
1419+
WS.106.1b | 106 | | PS.first.d2
1420+
WS.106.2a | 106 | | PS.first.d3
1421+
WS.106.2b | 106 | | PS.first.d4
1422+
WS.106.3a | 106 | | PS.first.d5
1423+
WS.106.3b | 106 | | PS.first.d6
14241424
(42 rows)
14251425

14261426
--
@@ -1439,16 +1439,16 @@ insert into PLine values ('PL.007', '-108', '', 'PS.base.tb3');
14391439
insert into PLine values ('PL.008', '-109', '', 'PS.base.tb4');
14401440
insert into PLine values ('PL.009', '-121', '', 'PS.base.tb5');
14411441
insert into PLine values ('PL.010', '-122', '', 'PS.base.tb6');
1442-
insert into PLine values ('PL.015', '-134', '', 'PS.1st.ta1');
1443-
insert into PLine values ('PL.016', '-137', '', 'PS.1st.ta3');
1444-
insert into PLine values ('PL.017', '-139', '', 'PS.1st.ta4');
1445-
insert into PLine values ('PL.018', '-362', '', 'PS.1st.tb1');
1446-
insert into PLine values ('PL.019', '-363', '', 'PS.1st.tb2');
1447-
insert into PLine values ('PL.020', '-364', '', 'PS.1st.tb3');
1448-
insert into PLine values ('PL.021', '-365', '', 'PS.1st.tb5');
1449-
insert into PLine values ('PL.022', '-367', '', 'PS.1st.tb6');
1442+
insert into PLine values ('PL.015', '-134', '', 'PS.first.ta1');
1443+
insert into PLine values ('PL.016', '-137', '', 'PS.first.ta3');
1444+
insert into PLine values ('PL.017', '-139', '', 'PS.first.ta4');
1445+
insert into PLine values ('PL.018', '-362', '', 'PS.first.tb1');
1446+
insert into PLine values ('PL.019', '-363', '', 'PS.first.tb2');
1447+
insert into PLine values ('PL.020', '-364', '', 'PS.first.tb3');
1448+
insert into PLine values ('PL.021', '-365', '', 'PS.first.tb5');
1449+
insert into PLine values ('PL.022', '-367', '', 'PS.first.tb6');
14501450
insert into PLine values ('PL.028', '-501', 'Fax entrance', 'PS.base.ta2');
1451-
insert into PLine values ('PL.029', '-502', 'Fax1st floor', 'PS.1st.ta1');
1451+
insert into PLine values ('PL.029', '-502', 'Faxfirst floor', 'PS.first.ta1');
14521452
--
14531453
-- Buy some phones, plug them into the wall and patch the
14541454
-- phone lines to the corresponding patchfield slots.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp