summaryrefslogtreecommitdiff
path: root/src/test/mb/expected/gb18030.out
blob: b14234dce400c6ef1f95f4572fe423f2a7ef2717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
drop table ӋCZ;
create table ӋCZ (Z text, ` varchar, 俼1A char(16));
create index ӋCZindex1 on ӋCZ using btree (Z);
create index ӋCZindex2 on ӋCZ using hash (`);
insert into ӋCZ values('ԥ`ǥץ쥤','CA01');
insert into ӋCZ values('ԥ`եå','B10');
insert into ӋCZ values('ԥ`ץީ`','Z01');
vacuum ӋCZ;
select * from ӋCZ;
            Z            | ` | 俼1a 
----------------------------+------------+------------
 ԥ`ǥץ쥤   | CA01    | 
 ԥ`եå | B10    | 
 ԥ`ץީ`   | Z01    | 
(3 rows)

select * from ӋCZ where ` = 'Z01';
           Z           | ` | 俼1a 
--------------------------+------------+------------
 ԥ`ץީ` | Z01    | 
(1 row)

select * from ӋCZ where ` ~* 'z01';
           Z           | ` | 俼1a 
--------------------------+------------+------------
 ԥ`ץީ` | Z01    | 
(1 row)

select * from ӋCZ where ` like '_Z01_';
           Z           | ` | 俼1a 
--------------------------+------------+------------
 ԥ`ץީ` | Z01    | 
(1 row)

select * from ӋCZ where ` like '_Z%';
           Z           | ` | 俼1a 
--------------------------+------------+------------
 ԥ`ץީ` | Z01    | 
(1 row)

select * from ӋCZ where Z ~ 'ԥ`[ǥ]';
            Z            | ` | 俼1a 
----------------------------+------------+------------
 ԥ`ǥץ쥤   | CA01    | 
 ԥ`եå | B10    | 
(2 rows)

select * from ӋCZ where Z ~* 'ԥ`[ǥ]';
            Z            | ` | 俼1a 
----------------------------+------------+------------
 ԥ`ǥץ쥤   | CA01    | 
 ԥ`եå | B10    | 
(2 rows)

select *,character_length(Z) from ӋCZ;
            Z            | ` | 俼1a | character_length 
----------------------------+------------+------------+------------------
 ԥ`ǥץ쥤   | CA01    |            |               12
 ԥ`եå | B10    |            |               13
 ԥ`ץީ`   | Z01    |            |               12
(3 rows)

select *,octet_length(Z) from ӋCZ;
            Z            | ` | 俼1a | octet_length 
----------------------------+------------+------------+--------------
 ԥ`ǥץ쥤   | CA01    |            |           36
 ԥ`եå | B10    |            |           39
 ԥ`ץީ`   | Z01    |            |           36
(3 rows)

select *,position('' in Z) from ӋCZ;
            Z            | ` | 俼1a | position 
----------------------------+------------+------------+----------
 ԥ`ǥץ쥤   | CA01    |            |        7
 ԥ`եå | B10    |            |        0
 ԥ`ץީ`   | Z01    |            |        0
(3 rows)

select *,substring(Z from 10 for 4) from ӋCZ;
            Z            | ` | 俼1a | substring 
----------------------------+------------+------------+-----------
 ԥ`ǥץ쥤   | CA01    |            | ץ쥤
 ԥ`եå | B10    |            | å
 ԥ`ץީ`   | Z01    |            | ީ`
(3 rows)