From: [email protected]
authorMarc G. Fournier
Sun, 15 Mar 1998 07:53:03 +0000 (07:53 +0000)
committerMarc G. Fournier
Sun, 15 Mar 1998 07:53:03 +0000 (07:53 +0000)
Included are patches intended for allowing PostgreSQL to handle
multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and
Mule internal code. With the MB patch you can use multi-byte character
sets in regexp and LIKE. The encoding system chosen is determined at
the compile time.

To enable the MB extension, you need to define a variable "MB" in
Makefile.global or in Makefile.custom. For further information please
take a look at README.mb under doc directory.

(Note that unlike "jp patch" I do not use modified GNU regexp any
more. I changed Henry Spencer's regexp coming with PostgreSQL.)

src/test/regress/expected/euc_cn.out [new file with mode: 0644]
src/test/regress/expected/euc_jp.out [new file with mode: 0644]
src/test/regress/expected/mule_internal.out [new file with mode: 0644]
src/test/regress/sql/euc_cn.sql [new file with mode: 0644]
src/test/regress/sql/euc_jp.sql [new file with mode: 0644]
src/test/regress/sql/mule_internal.sql [new file with mode: 0644]

diff --git a/src/test/regress/expected/euc_cn.out b/src/test/regress/expected/euc_cn.out
new file mode 100644 (file)
index 0000000..d927b28
--- /dev/null
@@ -0,0 +1,55 @@
+QUERY: drop table ¼ÆËã»úÊõÓï;
+ERROR:  Relation ¼ÆËã»úÊõÓï Does Not Exist!
+QUERY: create table ¼ÆËã»úÊõÓï(ÊõÓï text, ·ÖÀàºÅ varchar, ±¸×¢1A char(16));
+QUERY: create index ¼ÆËã»úÊõÓïindex1 on ¼ÆËã»úÊõÓï using btree(ÊõÓï);
+QUERY: create index ¼ÆËã»úÊõÓïindex2 on ¼ÆËã»úÊõÓï using btree(·ÖÀàºÅ);
+QUERY: insert into ¼ÆËã»úÊõÓï values('µçÄÔÏÔʾÆÁ','»úA01ÉÏ');
+QUERY: insert into ¼ÆËã»úÊõÓï values('µçÄÔͼÐÎ','·ÖB01ÖÐ');
+QUERY: insert into ¼ÆËã»úÊõÓï values('µçÄÔ³ÌÐòÔ±','ÈËZ01ÏÂ');
+QUERY: vacuum ¼ÆËã»úÊõÓï;
+QUERY: select * from ¼ÆËã»úÊõÓï;
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔÏÔʾÆÁ|»úA01ÉÏ|      
+µçÄÔͼÐΠ |·ÖB01ÖÐ|      
+µçÄÔ³ÌÐòÔ±|ÈËZ01ÏÂ|      
+(3 rows)
+
+QUERY: select * from ¼ÆËã»úÊõÓï where ·ÖÀàºÅ = 'ÈËZ01ÏÂ';
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔ³ÌÐòÔ±|ÈËZ01ÏÂ|      
+(1 row)
+
+QUERY: select * from ¼ÆËã»úÊõÓï where ·ÖÀàºÅ ~* 'ÈËz01ÏÂ';
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔ³ÌÐòÔ±|ÈËZ01ÏÂ|      
+(1 row)
+
+QUERY: select * from ¼ÆËã»úÊõÓï where ·ÖÀàºÅ like '_Z01_';
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔ³ÌÐòÔ±|ÈËZ01ÏÂ|      
+(1 row)
+
+QUERY: select * from ¼ÆËã»úÊõÓï where ·ÖÀàºÅ like '_Z%';
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔ³ÌÐòÔ±|ÈËZ01ÏÂ|      
+(1 row)
+
+QUERY: select * from ¼ÆËã»úÊõÓï where ÊõÓï ~ 'µçÄÔ[ÏÔͼ]';
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔÏÔʾÆÁ|»úA01ÉÏ|      
+µçÄÔͼÐΠ |·ÖB01ÖÐ|      
+(2 rows)
+
+QUERY: select * from ¼ÆËã»úÊõÓï where ÊõÓï ~* 'µçÄÔ[ÏÔͼ]';
+ÊõÓï      |·ÖÀàºÅ |±¸×¢1a
+----------+-------+------
+µçÄÔÏÔʾÆÁ|»úA01ÉÏ|      
+µçÄÔͼÐΠ |·ÖB01ÖÐ|      
+(2 rows)
+
diff --git a/src/test/regress/expected/euc_jp.out b/src/test/regress/expected/euc_jp.out
new file mode 100644 (file)
index 0000000..c710392
--- /dev/null
@@ -0,0 +1,55 @@
+QUERY: drop table ·×»»µ¡ÍѸì;
+ERROR:  Relation ·×»»µ¡ÍѸì Does Not Exist!
+QUERY: create table ·×»»µ¡ÍѸì (ÍѸì text, Ê¬Îॳ¡¼¥É varchar, È÷¹Í1A¤À¤è char(16));
+QUERY: create index ·×»»µ¡ÍѸìindex1 on ·×»»µ¡ÍѸì using btree (ÍѸì);
+QUERY: create index ·×»»µ¡ÍѸìindex2 on ·×»»µ¡ÍѸì using hash (ʬÎॳ¡¼¥É);
+QUERY: insert into ·×»»µ¡ÍѸì values('¥³¥ó¥Ô¥å¡¼¥¿¥Ç¥£¥¹¥×¥ì¥¤','µ¡A01¾å');
+QUERY: insert into ·×»»µ¡ÍѸì values('¥³¥ó¥Ô¥å¡¼¥¿¥°¥é¥Õ¥£¥Ã¥¯¥¹','ʬB10Ãæ');
+QUERY: insert into ·×»»µ¡ÍѸì values('¥³¥ó¥Ô¥å¡¼¥¿¥×¥í¥°¥é¥Þ¡¼','¿ÍZ01²¼');
+QUERY: vacuum ·×»»µ¡ÍѸì;
+QUERY: select * from ·×»»µ¡ÍѸì;
+ÍѸ젠                    |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+--------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥Ç¥£¥¹¥×¥ì¥¤  |µ¡A01¾å   |          
+¥³¥ó¥Ô¥å¡¼¥¿¥°¥é¥Õ¥£¥Ã¥¯¥¹|ʬB10Ãæ   |          
+¥³¥ó¥Ô¥å¡¼¥¿¥×¥í¥°¥é¥Þ¡¼  |¿ÍZ01²¼   |          
+(3 rows)
+
+QUERY: select * from ·×»»µ¡ÍѸì where Ê¬Îॳ¡¼¥É = '¿ÍZ01²¼';
+ÍѸ젠                  |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥×¥í¥°¥é¥Þ¡¼|¿ÍZ01²¼   |          
+(1 row)
+
+QUERY: select * from ·×»»µ¡ÍѸì where Ê¬Îॳ¡¼¥É ~* '¿Íz01²¼';
+ÍѸ젠                  |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥×¥í¥°¥é¥Þ¡¼|¿ÍZ01²¼   |          
+(1 row)
+
+QUERY: select * from ·×»»µ¡ÍѸì where Ê¬Îॳ¡¼¥É like '_Z01_';
+ÍѸ젠                  |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥×¥í¥°¥é¥Þ¡¼|¿ÍZ01²¼   |          
+(1 row)
+
+QUERY: select * from ·×»»µ¡ÍѸì where Ê¬Îॳ¡¼¥É like '_Z%';
+ÍѸ젠                  |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥×¥í¥°¥é¥Þ¡¼|¿ÍZ01²¼   |          
+(1 row)
+
+QUERY: select * from ·×»»µ¡ÍѸì where ÍѸì ~ '¥³¥ó¥Ô¥å¡¼¥¿[¥Ç¥°]';
+ÍѸ젠                    |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+--------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥Ç¥£¥¹¥×¥ì¥¤  |µ¡A01¾å   |          
+¥³¥ó¥Ô¥å¡¼¥¿¥°¥é¥Õ¥£¥Ã¥¯¥¹|ʬB10Ãæ   |          
+(2 rows)
+
+QUERY: select * from ·×»»µ¡ÍѸì where ÍѸì ~* '¥³¥ó¥Ô¥å¡¼¥¿[¥Ç¥°]';
+ÍѸ젠                    |ʬÎॳ¡¼¥É|È÷¹Í1a¤À¤è
+--------------------------+----------+----------
+¥³¥ó¥Ô¥å¡¼¥¿¥Ç¥£¥¹¥×¥ì¥¤  |µ¡A01¾å   |          
+¥³¥ó¥Ô¥å¡¼¥¿¥°¥é¥Õ¥£¥Ã¥¯¥¹|ʬB10Ãæ   |          
+(2 rows)
+
diff --git a/src/test/regress/expected/mule_internal.out b/src/test/regress/expected/mule_internal.out
new file mode 100644 (file)
index 0000000..c797072
--- /dev/null
@@ -0,0 +1,85 @@
+QUERY: drop table \92·×\92»»\92µ¡\92ÍÑ\92¸ì;
+ERROR:  Relation \92·×\92»»\92µ¡\92ÍÑ\92¸ì Does Not Exist!
+QUERY: create table \92·×\92»»\92µ¡\92ÍÑ\92¸ì (\92ÍÑ\92¸ì text, \92ʬ\92Îà\92¥³\92¡¼\92¥É varchar, \92È÷\92¹Í1A\92¤À\92¤è char(16));
+QUERY: create index \92·×\92»»\92µ¡\92ÍÑ\92¸ìindex1 on \92·×\92»»\92µ¡\92ÍÑ\92¸ì using btree (\92ÍÑ\92¸ì);
+QUERY: create index \92·×\92»»\92µ¡\92ÍÑ\92¸ìindex2 on \92·×\92»»\92µ¡\92ÍÑ\92¸ì using hash (\92ʬ\92Îà\92¥³\92¡¼\92¥É);
+QUERY: insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥Ç\92¥£\92¥¹\92¥×\92¥ì\92¥¤','\92µ¡A01\92¾å');
+QUERY: insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥°\92¥é\92¥Õ\92¥£\92¥Ã\92¥¯\92¥¹','\92ʬB10\92Ãæ');
+QUERY: insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼','\92¿ÍZ01\92²¼');
+QUERY: insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\91µç\91ÄÔ\91ÏÔ\91ʾ\91ÆÁ','\91»úA01\91ÉÏ');
+QUERY: insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\91µç\91ÄÔ\91ͼ\91ÐÎ','\91·ÖB01\91ÖÐ');
+QUERY: insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±','\91ÈËZ01\91ÏÂ');
+QUERY: vacuum \92·×\92»»\92µ¡\92ÍÑ\92¸ì;
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì;
+\92ÍÑ\92¸ì                                 |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+---------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥Ç\92¥£\92¥¹\92¥×\92¥ì\92¥¤   |\92µ¡A01\92¾å      |              
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥°\92¥é\92¥Õ\92¥£\92¥Ã\92¥¯\92¥¹|\92ʬB10\92Ãæ      |              
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼   |\92¿ÍZ01\92²¼      |              
+\91µç\91ÄÔ\91ÏÔ\91ʾ\91ÆÁ                        |\91»úA01\91ÉÏ      |              
+\91µç\91ÄÔ\91ͼ\91ÐΠ                          |\91·ÖB01\91ÖР     |              
+\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±                        |\91ÈËZ01\91Ï      |              
+(6 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É = '\92¿ÍZ01\92²¼';
+\92ÍÑ\92¸ì                              |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼|\92¿ÍZ01\92²¼      |              
+(1 row)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É ~ 'Z01';
+\92ÍÑ\92¸ì                              |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼|\92¿ÍZ01\92²¼      |              
+\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±                     |\91ÈËZ01\91Ï      |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É ~* 'z01';
+\92ÍÑ\92¸ì                              |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼|\92¿ÍZ01\92²¼      |              
+\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±                     |\91ÈËZ01\91Ï      |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É like '_Z01_';
+\92ÍÑ\92¸ì                              |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼|\92¿ÍZ01\92²¼      |              
+\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±                     |\91ÈËZ01\91Ï      |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É like '_Z%';
+\92ÍÑ\92¸ì                              |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼|\92¿ÍZ01\92²¼      |              
+\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±                     |\91ÈËZ01\91Ï      |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~ '\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿[\92¥Ç\92¥°]';
+\92ÍÑ\92¸ì                                 |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+---------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥Ç\92¥£\92¥¹\92¥×\92¥ì\92¥¤   |\92µ¡A01\92¾å      |              
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥°\92¥é\92¥Õ\92¥£\92¥Ã\92¥¯\92¥¹|\92ʬB10\92Ãæ      |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~* '\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿[\92¥Ç\92¥°]';
+\92ÍÑ\92¸ì                                 |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+---------------------------------------+---------------+--------------
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥Ç\92¥£\92¥¹\92¥×\92¥ì\92¥¤   |\92µ¡A01\92¾å      |              
+\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥°\92¥é\92¥Õ\92¥£\92¥Ã\92¥¯\92¥¹|\92ʬB10\92Ãæ      |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~ '\91µç\91ÄÔ[\91ÏÔ\91ͼ]';
+\92ÍÑ\92¸ì         |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+---------------+---------------+--------------
+\91µç\91ÄÔ\91ÏÔ\91ʾ\91ÆÁ|\91»úA01\91ÉÏ      |              
+\91µç\91ÄÔ\91ͼ\91ÐΠ  |\91·ÖB01\91ÖР     |              
+(2 rows)
+
+QUERY: select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~* '\91µç\91ÄÔ[\91ÏÔ\91ͼ]';
+\92ÍÑ\92¸ì         |\92ʬ\92Îà\92¥³\92¡¼\92¥É|\92È÷\92¹Í1a\92¤À\92¤è
+---------------+---------------+--------------
+\91µç\91ÄÔ\91ÏÔ\91ʾ\91ÆÁ|\91»úA01\91ÉÏ      |              
+\91µç\91ÄÔ\91ͼ\91ÐΠ  |\91·ÖB01\91ÖР     |              
+(2 rows)
+
diff --git a/src/test/regress/sql/euc_cn.sql b/src/test/regress/sql/euc_cn.sql
new file mode 100644 (file)
index 0000000..461c0c8
--- /dev/null
@@ -0,0 +1,15 @@
+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 ÊõÓï ~* 'µçÄÔ[ÏÔͼ]';
diff --git a/src/test/regress/sql/euc_jp.sql b/src/test/regress/sql/euc_jp.sql
new file mode 100644 (file)
index 0000000..8cba580
--- /dev/null
@@ -0,0 +1,15 @@
+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 ÍѸì ~* '¥³¥ó¥Ô¥å¡¼¥¿[¥Ç¥°]';
diff --git a/src/test/regress/sql/mule_internal.sql b/src/test/regress/sql/mule_internal.sql
new file mode 100644 (file)
index 0000000..6d07906
--- /dev/null
@@ -0,0 +1,21 @@
+drop table \92·×\92»»\92µ¡\92ÍÑ\92¸ì;
+create table \92·×\92»»\92µ¡\92ÍÑ\92¸ì (\92ÍÑ\92¸ì text, \92ʬ\92Îà\92¥³\92¡¼\92¥É varchar, \92È÷\92¹Í1A\92¤À\92¤è char(16));
+create index \92·×\92»»\92µ¡\92ÍÑ\92¸ìindex1 on \92·×\92»»\92µ¡\92ÍÑ\92¸ì using btree (\92ÍÑ\92¸ì);
+create index \92·×\92»»\92µ¡\92ÍÑ\92¸ìindex2 on \92·×\92»»\92µ¡\92ÍÑ\92¸ì using hash (\92ʬ\92Îà\92¥³\92¡¼\92¥É);
+insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥Ç\92¥£\92¥¹\92¥×\92¥ì\92¥¤','\92µ¡A01\92¾å');
+insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥°\92¥é\92¥Õ\92¥£\92¥Ã\92¥¯\92¥¹','\92ʬB10\92Ãæ');
+insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿\92¥×\92¥í\92¥°\92¥é\92¥Þ\92¡¼','\92¿ÍZ01\92²¼');
+insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\91µç\91ÄÔ\91ÏÔ\91ʾ\91ÆÁ','\91»úA01\91ÉÏ');
+insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\91µç\91ÄÔ\91ͼ\91ÐÎ','\91·ÖB01\91ÖÐ');
+insert into \92·×\92»»\92µ¡\92ÍÑ\92¸ì values('\91µç\91ÄÔ\91³Ì\91Ðò\91Ô±','\91ÈËZ01\91ÏÂ');
+vacuum \92·×\92»»\92µ¡\92ÍÑ\92¸ì;
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì;
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É = '\92¿ÍZ01\92²¼';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É ~ 'Z01';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É ~* 'z01';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É like '_Z01_';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ʬ\92Îà\92¥³\92¡¼\92¥É like '_Z%';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~ '\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿[\92¥Ç\92¥°]';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~* '\92¥³\92¥ó\92¥Ô\92¥å\92¡¼\92¥¿[\92¥Ç\92¥°]';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~ '\91µç\91ÄÔ[\91ÏÔ\91ͼ]';
+select * from \92·×\92»»\92µ¡\92ÍÑ\92¸ì where \92ÍÑ\92¸ì ~* '\91µç\91ÄÔ[\91ÏÔ\91ͼ]';