drop table 燹俑骜砧;
ERROR:  Relation '燹俑骜砧' does not exist
create table 燹俑骜砧 (如淦杀 text, 狞瞥婉螭 varchar, 氢蛇 varchar(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 燹俑骜砧;
 如淦杀 |     狞瞥婉螭     |  氢蛇   
--------+------------------+---------
 缳妾淦 | 绠绠绎世         | 啤A01念
 犒葸淦 | 芈溷却宇狞瞥     | 你B10你
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩
(3 rows)

select * from 燹俑骜砧 where 氢蛇 = '仨Z01摩';
 如淦杀 |     狞瞥婉螭     |  氢蛇   
--------+------------------+---------
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩
(1 row)

select * from 燹俑骜砧 where 氢蛇 ~* '仨z01摩';
 如淦杀 |     狞瞥婉螭     |  氢蛇   
--------+------------------+---------
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩
(1 row)

select * from 燹俑骜砧 where 氢蛇 like '_Z01_';
 如淦杀 |     狞瞥婉螭     |  氢蛇   
--------+------------------+---------
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩
(1 row)

select * from 燹俑骜砧 where 氢蛇 like '_Z%';
 如淦杀 |     狞瞥婉螭     |  氢蛇   
--------+------------------+---------
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩
(1 row)

select * from 燹俑骜砧 where 狞瞥婉螭 ~ '绠绠绎[凫卮世]';
 如淦杀 | 狞瞥婉螭 |  氢蛇   
--------+----------+---------
 缳妾淦 | 绠绠绎世 | 啤A01念
(1 row)

select * from 燹俑骜砧 where 狞瞥婉螭 ~* '绠绠绎[凫卮世]';
 如淦杀 | 狞瞥婉螭 |  氢蛇   
--------+----------+---------
 缳妾淦 | 绠绠绎世 | 啤A01念
(1 row)

select *, character_length(如淦杀) from 燹俑骜砧;
 如淦杀 |     狞瞥婉螭     |  氢蛇   | char_length 
--------+------------------+---------+-------------
 缳妾淦 | 绠绠绎世         | 啤A01念 |           3
 犒葸淦 | 芈溷却宇狞瞥     | 你B10你 |           3
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩 |           3
(3 rows)

select *, octet_length(如淦杀) from 燹俑骜砧;
 如淦杀 |     狞瞥婉螭     |  氢蛇   | octet_length 
--------+------------------+---------+--------------
 缳妾淦 | 绠绠绎世         | 啤A01念 |            6
 犒葸淦 | 芈溷却宇狞瞥     | 你B10你 |            6
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩 |            6
(3 rows)

select *, position('却宇' in 狞瞥婉螭) from 燹俑骜砧;
 如淦杀 |     狞瞥婉螭     |  氢蛇   | strpos 
--------+------------------+---------+--------
 缳妾淦 | 绠绠绎世         | 啤A01念 |      0
 犒葸淦 | 芈溷却宇狞瞥     | 你B10你 |      3
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩 |      5
(3 rows)

select *, substring(狞瞥婉螭 from 3 for 6 ) from 燹俑骜砧;
 如淦杀 |     狞瞥婉螭     |  氢蛇   |    substr    
--------+------------------+---------+--------------
 缳妾淦 | 绠绠绎世         | 啤A01念 | 绎世
 犒葸淦 | 芈溷却宇狞瞥     | 你B10你 | 却宇狞瞥
 螫悖淦 | 印汤洗枪却宇狞瞥 | 仨Z01摩 | 洗枪却宇狞瞥
(3 rows)

