mirror of
https://github.com/postgres/postgres.git
synced 2026-02-12 23:33:27 -05:00
Hi, here are patches I promised (against 6.3.2):
* character_length(), position(), substring() are now aware of
multi-byte characters
* add octet_length()
* add --with-mb option to configure
* new regression tests for EUC_KR
(contributed by "Soonmyung. Hong" <hong@lunaris.hanmesoft.co.kr>)
* add some test cases to the EUC_JP regression test
* fix problem in regress/regress.sh in case of System V
* fix toupper(), tolower() to handle 8bit chars
note that:
o patches for both configure.in and configure are
included. maybe the one for configure is not necessary.
o pg_proc.h was modified to add octet_length(). I used OIDs
(1374-1379) for that. Please let me know if these numbers are not
appropriate.
19 lines
1 KiB
SQL
19 lines
1 KiB
SQL
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 計算機用語;
|