mirror of
https://github.com/postgres/postgres.git
synced 2026-02-18 18:25:17 -05:00
From: t-ishii@sra.co.jp Attached are patches to enhance the multi-byte support. (patches are against 7/18 snapshot) * determine encoding at initdb/createdb rather than compile time Now initdb/createdb has an option to specify the encoding. Also, I modified the syntax of CREATE DATABASE to accept encoding option. See README.mb for more details. For this purpose I have added new column "encoding" to pg_database. Also pg_attribute and pg_class are changed to catch up the modification to pg_database. Actually I haved added pg_database_mb.h, pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is enabled. The reason having separate files is I couldn't find a way to use ifdef or whatever in those files. I have to admit it looks ugly. No way. * support for PGCLIENTENCODING when issuing COPY command commands/copy.c modified. * support for SQL92 syntax "SET NAMES" See gram.y. * support for LATIN2-5 * add UNICODE regression test case * new test suite for MB New directory test/mb added. * clean up source files Basic idea is to have MB's own subdirectory for easier maintenance. These are include/mb and backend/utils/mb.
20 lines
1 KiB
SQL
20 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 計算機用語;
|
|
copy 計算機用語 to stdout;
|