You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
postgres/src/test/regress/sql/mule_internal.sql

72 lines
4.0 KiB

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<EFBFBD>ÇAIS ESPA<EFBFBD>ÑOL <EFBFBD>Í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;