[Groonga-commit] pgroonga/pgroonga at 504e051 [master] test: add a test for TRUNCATE

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jul 10 13:46:12 JST 2015


Kouhei Sutou	2015-07-10 13:46:12 +0900 (Fri, 10 Jul 2015)

  New Revision: 504e0516e6a4190c54b088b68a048fbd22199514
  https://github.com/pgroonga/pgroonga/commit/504e0516e6a4190c54b088b68a048fbd22199514

  Message:
    test: add a test for TRUNCATE
    
    It works.

  Added files:
    expected/full-text-search/text/single/truncate.out
    sql/full-text-search/text/single/truncate.sql

  Added: expected/full-text-search/text/single/truncate.out (+21 -0) 100644
===================================================================
--- /dev/null
+++ expected/full-text-search/text/single/truncate.out    2015-07-10 13:46:12 +0900 (465590b)
@@ -0,0 +1,21 @@
+CREATE TABLE memos (
+  id integer,
+  content text
+);
+INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
+CREATE INDEX grnindex ON memos USING pgroonga (content);
+TRUNCATE memos;
+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.');
+SET enable_seqscan = off;
+SET enable_indexscan = on;
+SET enable_bitmapscan = off;
+SELECT id, content
+  FROM memos
+ WHERE content %% 'PostgreSQL';
+ id |                        content                        
+----+-------------------------------------------------------
+  3 | PGroonga is a PostgreSQL extension that uses Groonga.
+(1 row)
+
+DROP TABLE memos;

  Added: sql/full-text-search/text/single/truncate.sql (+23 -0) 100644
===================================================================
--- /dev/null
+++ sql/full-text-search/text/single/truncate.sql    2015-07-10 13:46:12 +0900 (2c7218d)
@@ -0,0 +1,23 @@
+CREATE TABLE memos (
+  id integer,
+  content text
+);
+
+INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
+
+CREATE INDEX grnindex ON memos USING pgroonga (content);
+
+TRUNCATE memos;
+
+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.');
+
+SET enable_seqscan = off;
+SET enable_indexscan = on;
+SET enable_bitmapscan = off;
+
+SELECT id, content
+  FROM memos
+ WHERE content %% 'PostgreSQL';
+
+DROP TABLE memos;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index