mirror of https://github.com/postgres/postgres
The expected-output files for these tests were broken by the recent addition of a warning for hash indexes. Update them. Also add a test case for GB18030 encoding, similar to the other ones. This is a pretty weak test, but it's better than nothing.pull/14/head
parent
8b0f105d2d
commit
07af523870
@ -0,0 +1,87 @@ |
||||
drop table 計算機用語; |
||||
create table 計算機用語 (用語 text, 分類コード varchar, 備考1Aだよ char(16)); |
||||
create index 計算機用語index1 on 計算機用語 using btree (用語); |
||||
create index 計算機用語index2 on 計算機用語 using hash (分類コード); |
||||
WARNING: hash indexes are not WAL-logged and their use is discouraged |
||||
insert into 計算機用語 values('コンピュータディスプレイ','機A01上'); |
||||
insert into 計算機用語 values('コンピュータグラフィックス','分B10中'); |
||||
insert into 計算機用語 values('コンピュータプログラマー','人Z01下'); |
||||
vacuum 計算機用語; |
||||
select * from 計算機用語; |
||||
用語 | 分類コード | 備考1aだよ |
||||
----------------------------+------------+------------ |
||||
コンピュータディスプレイ | 機A01上 | |
||||
コンピュータグラフィックス | 分B10中 | |
||||
コンピュータプログラマー | 人Z01下 | |
||||
(3 rows) |
||||
|
||||
select * from 計算機用語 where 分類コード = '人Z01下'; |
||||
用語 | 分類コード | 備考1aだよ |
||||
--------------------------+------------+------------ |
||||
コンピュータプログラマー | 人Z01下 | |
||||
(1 row) |
||||
|
||||
select * from 計算機用語 where 分類コード ~* '人z01下'; |
||||
用語 | 分類コード | 備考1aだよ |
||||
--------------------------+------------+------------ |
||||
コンピュータプログラマー | 人Z01下 | |
||||
(1 row) |
||||
|
||||
select * from 計算機用語 where 分類コード like '_Z01_'; |
||||
用語 | 分類コード | 備考1aだよ |
||||
--------------------------+------------+------------ |
||||
コンピュータプログラマー | 人Z01下 | |
||||
(1 row) |
||||
|
||||
select * from 計算機用語 where 分類コード like '_Z%'; |
||||
用語 | 分類コード | 備考1aだよ |
||||
--------------------------+------------+------------ |
||||
コンピュータプログラマー | 人Z01下 | |
||||
(1 row) |
||||
|
||||
select * from 計算機用語 where 用語 ~ 'コンピュータ[デグ]'; |
||||
用語 | 分類コード | 備考1aだよ |
||||
----------------------------+------------+------------ |
||||
コンピュータディスプレイ | 機A01上 | |
||||
コンピュータグラフィックス | 分B10中 | |
||||
(2 rows) |
||||
|
||||
select * from 計算機用語 where 用語 ~* 'コンピュータ[デグ]'; |
||||
用語 | 分類コード | 備考1aだよ |
||||
----------------------------+------------+------------ |
||||
コンピュータディスプレイ | 機A01上 | |
||||
コンピュータグラフィックス | 分B10中 | |
||||
(2 rows) |
||||
|
||||
select *,character_length(用語) from 計算機用語; |
||||
用語 | 分類コード | 備考1aだよ | character_length |
||||
----------------------------+------------+------------+------------------ |
||||
コンピュータディスプレイ | 機A01上 | | 12 |
||||
コンピュータグラフィックス | 分B10中 | | 13 |
||||
コンピュータプログラマー | 人Z01下 | | 12 |
||||
(3 rows) |
||||
|
||||
select *,octet_length(用語) from 計算機用語; |
||||
用語 | 分類コード | 備考1aだよ | octet_length |
||||
----------------------------+------------+------------+-------------- |
||||
コンピュータディスプレイ | 機A01上 | | 36 |
||||
コンピュータグラフィックス | 分B10中 | | 39 |
||||
コンピュータプログラマー | 人Z01下 | | 36 |
||||
(3 rows) |
||||
|
||||
select *,position('デ' in 用語) from 計算機用語; |
||||
用語 | 分類コード | 備考1aだよ | position |
||||
----------------------------+------------+------------+---------- |
||||
コンピュータディスプレイ | 機A01上 | | 7 |
||||
コンピュータグラフィックス | 分B10中 | | 0 |
||||
コンピュータプログラマー | 人Z01下 | | 0 |
||||
(3 rows) |
||||
|
||||
select *,substring(用語 from 10 for 4) from 計算機用語; |
||||
用語 | 分類コード | 備考1aだよ | substring |
||||
----------------------------+------------+------------+----------- |
||||
コンピュータディスプレイ | 機A01上 | | プレイ |
||||
コンピュータグラフィックス | 分B10中 | | ィックス |
||||
コンピュータプログラマー | 人Z01下 | | ラマー |
||||
(3 rows) |
||||
|
||||
@ -0,0 +1,19 @@ |
||||
drop table 計算機用語; |
||||
create table 計算機用語 (用語 text, 分類コード varchar, 備考1Aだよ char(16)); |
||||
create index 計算機用語index1 on 計算機用語 using btree (用語); |
||||
create index 計算機用語index2 on 計算機用語 using hash (分類コード); |
||||
insert into 計算機用語 values('コンピュータディスプレイ','機A01上'); |
||||
insert into 計算機用語 values('コンピュータグラフィックス','分B10中'); |
||||
insert into 計算機用語 values('コンピュータプログラマー','人Z01下'); |
||||
vacuum 計算機用語; |
||||
select * from 計算機用語; |
||||
select * from 計算機用語 where 分類コード = '人Z01下'; |
||||
select * from 計算機用語 where 分類コード ~* '人z01下'; |
||||
select * from 計算機用語 where 分類コード like '_Z01_'; |
||||
select * from 計算機用語 where 分類コード like '_Z%'; |
||||
select * from 計算機用語 where 用語 ~ 'コンピュータ[デグ]'; |
||||
select * from 計算機用語 where 用語 ~* 'コンピュータ[デグ]'; |
||||
select *,character_length(用語) from 計算機用語; |
||||
select *,octet_length(用語) from 計算機用語; |
||||
select *,position('デ' in 用語) from 計算機用語; |
||||
select *,substring(用語 from 10 for 4) from 計算機用語; |
||||
Loading…
Reference in new issue