|
1 |
| -QUERY: drop table �v�Z�@�p��; |
2 |
| -QUERY: create table �v�Z�@�p�� (�p�� text, ���ރR�[�h varchar, ���l1A���� char(16)); |
3 |
| -QUERY: create index �v�Z�@�p��index1 on �v�Z�@�p�� using btree (�p��); |
4 |
| -QUERY: create index �v�Z�@�p��index2 on �v�Z�@�p�� using hash (���ރR�[�h); |
5 |
| -QUERY: insert into �v�Z�@�p�� values('�R���s���[�^�f�B�X�v���C','�@A01��'); |
6 |
| -QUERY: insert into �v�Z�@�p�� values('�R���s���[�^�O���t�B�b�N�X','��B10��'); |
7 |
| -QUERY: insert into �v�Z�@�p�� values('�R���s���[�^�v���O���}�[','�lZ01��'); |
8 |
| -QUERY: vacuum �v�Z�@�p��; |
9 |
| -QUERY: select * from �v�Z�@�p��; |
10 |
| -�p�� |���ރR�[�h|���l1a���� |
11 |
| ---------------------------+----------+---------- |
12 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | |
13 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | |
14 |
| -�R���s���[�^�v���O���}�[ |�lZ01�� | |
| 1 | +drop table �v�Z�@�p��; |
| 2 | +create table �v�Z�@�p�� (�p�� text, ���ރR�[�h varchar, ���l1A���� char(16)); |
| 3 | +create index �v�Z�@�p��index1 on �v�Z�@�p�� using btree (�p��); |
| 4 | +create index �v�Z�@�p��index2 on �v�Z�@�p�� using hash (���ރR�[�h); |
| 5 | +insert into �v�Z�@�p�� values('�R���s���[�^�f�B�X�v���C','�@A01��'); |
| 6 | +insert into �v�Z�@�p�� values('�R���s���[�^�O���t�B�b�N�X','��B10��'); |
| 7 | +insert into �v�Z�@�p�� values('�R���s���[�^�v���O���}�[','�lZ01��'); |
| 8 | +vacuum �v�Z�@�p��; |
| 9 | +select * from �v�Z�@�p��; |
| 10 | + �p�� | ���ރR�[�h | ���l1a���� |
| 11 | +----------------------------+------------+------------ |
| 12 | + �R���s���[�^�f�B�X�v���C | �@A01�� | |
| 13 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | |
| 14 | + �R���s���[�^�v���O���}�[ | �lZ01�� | |
15 | 15 | (3 rows)
|
16 | 16 |
|
17 |
| -QUERY: select * from �v�Z�@�p�� where ���ރR�[�h = '�lZ01��'; |
18 |
| -�p�� |���ރR�[�h|���l1a���� |
19 |
| -------------------------+----------+---------- |
20 |
| -�R���s���[�^�v���O���}�[|�lZ01�� | |
| 17 | +select * from �v�Z�@�p�� where ���ރR�[�h = '�lZ01��'; |
| 18 | + �p�� | ���ރR�[�h | ���l1a���� |
| 19 | +--------------------------+------------+------------ |
| 20 | + �R���s���[�^�v���O���}�[ | �lZ01�� | |
21 | 21 | (1 row)
|
22 | 22 |
|
23 |
| -QUERY: select * from �v�Z�@�p�� where ���ރR�[�h ~* '�lz01��'; |
24 |
| -�p�� |���ރR�[�h|���l1a���� |
25 |
| -------------------------+----------+---------- |
26 |
| -�R���s���[�^�v���O���}�[|�lZ01�� | |
| 23 | +select * from �v�Z�@�p�� where ���ރR�[�h ~* '�lz01��'; |
| 24 | + �p�� | ���ރR�[�h | ���l1a���� |
| 25 | +--------------------------+------------+------------ |
| 26 | + �R���s���[�^�v���O���}�[ | �lZ01�� | |
27 | 27 | (1 row)
|
28 | 28 |
|
29 |
| -QUERY: select * from �v�Z�@�p�� where ���ރR�[�h like '_Z01_'; |
30 |
| -�p�� |���ރR�[�h|���l1a���� |
31 |
| -------------------------+----------+---------- |
32 |
| -�R���s���[�^�v���O���}�[|�lZ01�� | |
| 29 | +select * from �v�Z�@�p�� where ���ރR�[�h like '_Z01_'; |
| 30 | + �p�� | ���ރR�[�h | ���l1a���� |
| 31 | +--------------------------+------------+------------ |
| 32 | + �R���s���[�^�v���O���}�[ | �lZ01�� | |
33 | 33 | (1 row)
|
34 | 34 |
|
35 |
| -QUERY: select * from �v�Z�@�p�� where ���ރR�[�h like '_Z%'; |
36 |
| -�p�� |���ރR�[�h|���l1a���� |
37 |
| -------------------------+----------+---------- |
38 |
| -�R���s���[�^�v���O���}�[|�lZ01�� | |
| 35 | +select * from �v�Z�@�p�� where ���ރR�[�h like '_Z%'; |
| 36 | + �p�� | ���ރR�[�h | ���l1a���� |
| 37 | +--------------------------+------------+------------ |
| 38 | + �R���s���[�^�v���O���}�[ | �lZ01�� | |
39 | 39 | (1 row)
|
40 | 40 |
|
41 |
| -QUERY: select * from �v�Z�@�p�� where �p�� ~ '�R���s���[�^[�f�O]'; |
42 |
| -�p�� |���ރR�[�h|���l1a���� |
43 |
| ---------------------------+----------+---------- |
44 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | |
45 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | |
| 41 | +select * from �v�Z�@�p�� where �p�� ~ '�R���s���[�^[�f�O]'; |
| 42 | + �p�� | ���ރR�[�h | ���l1a���� |
| 43 | +----------------------------+------------+------------ |
| 44 | + �R���s���[�^�f�B�X�v���C | �@A01�� | |
| 45 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | |
46 | 46 | (2 rows)
|
47 | 47 |
|
48 |
| -QUERY: select * from �v�Z�@�p�� where �p�� ~* '�R���s���[�^[�f�O]'; |
49 |
| -�p�� |���ރR�[�h|���l1a���� |
50 |
| ---------------------------+----------+---------- |
51 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | |
52 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | |
| 48 | +select * from �v�Z�@�p�� where �p�� ~* '�R���s���[�^[�f�O]'; |
| 49 | + �p�� | ���ރR�[�h | ���l1a���� |
| 50 | +----------------------------+------------+------------ |
| 51 | + �R���s���[�^�f�B�X�v���C | �@A01�� | |
| 52 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | |
53 | 53 | (2 rows)
|
54 | 54 |
|
55 |
| -QUERY: select *,character_length(�p��) from �v�Z�@�p��; |
56 |
| -�p�� |���ރR�[�h|���l1a����|length |
57 |
| ---------------------------+----------+----------+------ |
58 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | | 12 |
59 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | | 13 |
60 |
| -�R���s���[�^�v���O���}�[ |�lZ01�� | | 12 |
| 55 | +select *,character_length(�p��) from �v�Z�@�p��; |
| 56 | + �p�� | ���ރR�[�h | ���l1a���� | length |
| 57 | +----------------------------+------------+------------+-------- |
| 58 | + �R���s���[�^�f�B�X�v���C | �@A01�� | | 12 |
| 59 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | | 13 |
| 60 | + �R���s���[�^�v���O���}�[ | �lZ01�� | | 12 |
61 | 61 | (3 rows)
|
62 | 62 |
|
63 |
| -QUERY: select *,octet_length(�p��) from �v�Z�@�p��; |
64 |
| -�p�� |���ރR�[�h|���l1a����|octet_length |
65 |
| ---------------------------+----------+----------+------------ |
66 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | | 24 |
67 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | | 26 |
68 |
| -�R���s���[�^�v���O���}�[ |�lZ01�� | | 24 |
| 63 | +select *,octet_length(�p��) from �v�Z�@�p��; |
| 64 | + �p�� | ���ރR�[�h | ���l1a���� | octet_length |
| 65 | +----------------------------+------------+------------+-------------- |
| 66 | + �R���s���[�^�f�B�X�v���C | �@A01�� | | 24 |
| 67 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | | 26 |
| 68 | + �R���s���[�^�v���O���}�[ | �lZ01�� | | 24 |
69 | 69 | (3 rows)
|
70 | 70 |
|
71 |
| -QUERY: select *,position('�f' in �p��) from �v�Z�@�p��; |
72 |
| -�p�� |���ރR�[�h|���l1a����|strpos |
73 |
| ---------------------------+----------+----------+------ |
74 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | | 7 |
75 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | | 0 |
76 |
| -�R���s���[�^�v���O���}�[ |�lZ01�� | | 0 |
| 71 | +select *,position('�f' in �p��) from �v�Z�@�p��; |
| 72 | + �p�� | ���ރR�[�h | ���l1a���� | strpos |
| 73 | +----------------------------+------------+------------+-------- |
| 74 | + �R���s���[�^�f�B�X�v���C | �@A01�� | | 7 |
| 75 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | | 0 |
| 76 | + �R���s���[�^�v���O���}�[ | �lZ01�� | | 0 |
77 | 77 | (3 rows)
|
78 | 78 |
|
79 |
| -QUERY: select *,substring(�p�� from 10 for 4) from �v�Z�@�p��; |
80 |
| -�p�� |���ރR�[�h|���l1a����|substr |
81 |
| ---------------------------+----------+----------+-------- |
82 |
| -�R���s���[�^�f�B�X�v���C |�@A01�� | |�v���C |
83 |
| -�R���s���[�^�O���t�B�b�N�X|��B10�� | |�B�b�N�X |
84 |
| -�R���s���[�^�v���O���}�[ |�lZ01�� | |���}�[ |
| 79 | +select *,substring(�p�� from 10 for 4) from �v�Z�@�p��; |
| 80 | + �p�� | ���ރR�[�h | ���l1a���� | substr |
| 81 | +----------------------------+------------+------------+---------- |
| 82 | + �R���s���[�^�f�B�X�v���C | �@A01�� | | �v���C |
| 83 | + �R���s���[�^�O���t�B�b�N�X | ��B10�� | | �B�b�N�X |
| 84 | + �R���s���[�^�v���O���}�[ | �lZ01�� | | ���}�[ |
85 | 85 | (3 rows)
|
86 | 86 |
|
87 |
| -QUERY: copy �v�Z�@�p�� to stdout; |
| 87 | +copy �v�Z�@�p�� to stdout; |
88 | 88 | �R���s���[�^�f�B�X�v���C �@A01�� \N
|
89 | 89 | �R���s���[�^�O���t�B�b�N�X ��B10�� \N
|
90 | 90 | �R���s���[�^�v���O���}�[ �lZ01�� \N
|
0 commit comments