mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-12 04:16:50 +02:00
cb7cbc16fa
I have implemented a framework of encoding translation between the backend and the frontend. Also I have added a new variable setting command: SET CLIENT_ENCODING TO 'encoding'; Other features include: Latin1 support more 8 bit cleaness See doc/README.mb for more details. Note that the pacthes are against May 30 snapshot. Tatsuo Ishii
73 lines
4.0 KiB
SQL
73 lines
4.0 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 ’·×’»»’µ¡’ÍÑ’¸ì;
|
||
drop table ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï;
|
||
create table ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï(‘Êõ‘Óï text, ‘·Ö‘Àà‘ºÅ varchar, ‘±¸‘×¢1A char(16));
|
||
create index ‘¼Æ‘Ëã‘»ú‘Êõ‘Óïindex1 on ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï using btree(‘Êõ‘Óï);
|
||
create index ‘¼Æ‘Ëã‘»ú‘Êõ‘Óïindex2 on ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï using btree(‘·Ö‘Àà‘ºÅ);
|
||
insert into ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï values('‘µç‘ÄÔ‘Ïԑʾ‘ÆÁ','‘»úA01‘ÉÏ');
|
||
insert into ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï values('‘µç‘Äԑͼ‘ÐÎ','‘·ÖB01‘ÖÐ');
|
||
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 3 for 4) from ‘¼Æ‘Ëã‘»ú‘Êõ‘Óï;
|
||
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 3 for 4) from “ͪ“ß©“Ѧ“¿ë“¾î;
|
||
drop table test;
|
||
create table test (t text);
|
||
insert into test values('ENGLISH');
|
||
insert into test values('FRAN<EFBFBD>ÇAIS');
|
||
insert into test values('ESPA<EFBFBD>ÑOL');
|
||
insert into test values('<EFBFBD>ÍSLENSKA');
|
||
insert into test values('ENGLISH FRAN<41>ÇAIS ESPA<50>ÑOL <20>ÍSLENSKA');
|
||
vacuum test;
|
||
select * from test;
|
||
select * from test where t = 'ESPA<EFBFBD>ÑOL';
|
||
select * from test where t ~* 'espa<EFBFBD>Ñol';
|
||
select *,character_length(t) from test;
|
||
select *,octet_length(t) from test;
|
||
select *,position('L' in t) from test;
|
||
select *,substring(t from 3 for 4) from test;
|