drop table ìÞÙ¸æñÕè; ERROR: table "ìÞÙ¸æñÕè" 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 ìÞÙ¸æñÕè; ÈçäÆɱ | ÄüƳÍñó¤ | ÇâÉß | character_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 ìÞÙ¸æñÕè; ÈçäÆɱ | ÄüƳÍñó¤ | ÇâÉß | position --------+------------------+---------+---------- çÙæªäÆ | ç®ç®ÒïÊÀ | Æ¡A01Äî | 0 êûÝßäÆ | ØÂäãÈ´ÓîÄüƳ | ÄãB10Äã | 3 ó§ã£äÆ | Ó¡ÌÀϴǹȴÓîÄüƳ | ØíZ01Ħ | 5 (3 rows) select *, substring(ÄüƳÍñó¤ from 3 for 6 ) from ìÞÙ¸æñÕè; ÈçäÆɱ | ÄüƳÍñó¤ | ÇâÉß | substring --------+------------------+---------+-------------- çÙæªäÆ | ç®ç®ÒïÊÀ | Æ¡A01Äî | ÒïÊÀ êûÝßäÆ | ØÂäãÈ´ÓîÄüƳ | ÄãB10Äã | È´ÓîÄüƳ ó§ã£äÆ | Ó¡ÌÀϴǹȴÓîÄüƳ | ØíZ01Ħ | ϴǹȴÓîÄüƳ (3 rows)