Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add tests for ILIKE with regular expression
- Loading branch information
Showing
48 changed files
with
540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA%'; | ||
| id | content | ||
| ----+------------------------------------------ | ||
| 2 | Groonga is fast full text search engine. | ||
| 4 | groonga command is provided. | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA%'; | ||
| id | content | ||
| ----+------------------------------------------ | ||
| 2 | Groonga is fast full text search engine. | ||
| 4 | groonga command is provided. | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA%'; | ||
| id | content | ||
| ----+------------------------------------------ | ||
| 2 | Groonga is fast full text search engine. | ||
| 4 | groonga command is provided. | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE '%GROONGA'; | ||
| id | content | ||
| ----+------------------------------------------------------ | ||
| 3 | PGroonga is a PostgreSQL extension that uses Groonga | ||
| (1 row) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE '%GROONGA'; | ||
| id | content | ||
| ----+------------------------------------------------------ | ||
| 3 | PGroonga is a PostgreSQL extension that uses Groonga | ||
| (1 row) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE '%GROONGA'; | ||
| id | content | ||
| ----+------------------------------------------------------ | ||
| 3 | PGroonga is a PostgreSQL extension that uses Groonga | ||
| (1 row) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL'); | ||
| INSERT INTO memos VALUES (2, 'Groonga'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga'); | ||
| INSERT INTO memos VALUES (4, 'groonga'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA'; | ||
| id | content | ||
| ----+--------- | ||
| 2 | Groonga | ||
| 4 | groonga | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL'); | ||
| INSERT INTO memos VALUES (2, 'Groonga'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga'); | ||
| INSERT INTO memos VALUES (4, 'groonga'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA'; | ||
| id | content | ||
| ----+--------- | ||
| 2 | Groonga | ||
| 4 | groonga | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL'); | ||
| INSERT INTO memos VALUES (2, 'Groonga'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga'); | ||
| INSERT INTO memos VALUES (4, 'groonga'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA'; | ||
| id | content | ||
| ----+--------- | ||
| 2 | Groonga | ||
| 4 | groonga | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE '%GROONGA%'; | ||
| id | content | ||
| ----+------------------------------------------------------- | ||
| 2 | Groonga is fast full text search engine. | ||
| 3 | PGroonga is a PostgreSQL extension that uses Groonga. | ||
| 4 | groonga command is provided. | ||
| (3 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE '%GROONGA%'; | ||
| id | content | ||
| ----+------------------------------------------------------- | ||
| 2 | Groonga is fast full text search engine. | ||
| 3 | PGroonga is a PostgreSQL extension that uses Groonga. | ||
| 4 | groonga command is provided. | ||
| (3 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE '%GROONGA%'; | ||
| id | content | ||
| ----+------------------------------------------------------- | ||
| 2 | Groonga is fast full text search engine. | ||
| 3 | PGroonga is a PostgreSQL extension that uses Groonga. | ||
| 4 | groonga command is provided. | ||
| (3 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
| ); | ||
|
|
||
| INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); | ||
| INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); | ||
| INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); | ||
| INSERT INTO memos VALUES (4, 'groonga command is provided.'); | ||
|
|
||
| CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga.text_regexp_ops); | ||
|
|
||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
|
|
||
| SELECT id, content | ||
| FROM memos | ||
| WHERE content ILIKE 'GROONGA%'; | ||
|
|
||
| DROP TABLE memos; |
Oops, something went wrong.