Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
drop table ŒvŽZ‹@—pŒê;
create table ŒvŽZ‹@—pŒê (—pŒê text, •ª—ÞƒR[ƒh varchar, ”õl1A‚¾‚æ char(16));
create index ŒvŽZ‹@—pŒêindex1 on ŒvŽZ‹@—pŒê using btree (—pŒê);
create index ŒvŽZ‹@—pŒêindex2 on ŒvŽZ‹@—pŒê using hash (•ª—ÞƒR[ƒh);
insert into ŒvŽZ‹@—pŒê values('ƒRƒ“ƒsƒ…[ƒ^ƒfƒBƒXƒvƒŒƒC','‹@A01ã');
insert into ŒvŽZ‹@—pŒê values('ƒRƒ“ƒsƒ…[ƒ^ƒOƒ‰ƒtƒBƒbƒNƒX','•ªB10’†');
insert into ŒvŽZ‹@—pŒê values('ƒRƒ“ƒsƒ…[ƒ^ƒvƒƒOƒ‰ƒ}[','lZ01‰º');
vacuum ŒvŽZ‹@—pŒê;
select * from ŒvŽZ‹@—pŒê;
select * from ŒvŽZ‹@—pŒê where •ª—ÞƒR[ƒh = 'lZ01‰º';
select * from ŒvŽZ‹@—pŒê where •ª—ÞƒR[ƒh ~* 'lz01‰º';
select * from ŒvŽZ‹@—pŒê where •ª—ÞƒR[ƒh like '_Z01_';
select * from ŒvŽZ‹@—pŒê where •ª—ÞƒR[ƒh like '_Z%';
select * from ŒvŽZ‹@—pŒê where —pŒê ~ 'ƒRƒ“ƒsƒ…[ƒ^[ƒfƒO]';
select * from ŒvŽZ‹@—pŒê where —pŒê ~* 'ƒRƒ“ƒsƒ…[ƒ^[ƒfƒO]';
select *,character_length(—pŒê) from ŒvŽZ‹@—pŒê;
select *,octet_length(—pŒê) from ŒvŽZ‹@—pŒê;
select *,position('ƒf' in —pŒê) from ŒvŽZ‹@—pŒê;
select *,substring(—pŒê from 10 for 4) from ŒvŽZ‹@—pŒê;
copy ŒvŽZ‹@—pŒê to stdout;