[Groonga-commit] pgroonga/pgroonga at 96eb9ef [master] Add a test for indexscan match

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jan 18 22:56:54 JST 2015


Kouhei Sutou	2015-01-18 22:56:54 +0900 (Sun, 18 Jan 2015)

  New Revision: 96eb9efdc65b7d37bb160170c6cd287f6aacbe96
  https://github.com/pgroonga/pgroonga/commit/96eb9efdc65b7d37bb160170c6cd287f6aacbe96

  Message:
    Add a test for indexscan match

  Copied files:
    expected/text/indexscan.out
      (from expected/text/seqscan.out)
    sql/text/indexscan.sql
      (from sql/text/seqscan.sql)
  Modified files:
    Makefile
    expected/text/seqscan.out
    sql/text/seqscan.sql

  Modified: Makefile (+1 -0)
===================================================================
--- Makefile    2015-01-18 22:51:10 +0900 (0c38483)
+++ Makefile    2015-01-18 22:56:54 +0900 (c2de602)
@@ -7,6 +7,7 @@ PG_CPPFLAGS = $(shell pkg-config --cflags groonga)
 SHLIB_LINK = $(shell pkg-config --libs groonga)
 # REGRESS = pgroonga update bench
 REGRESS = $(shell find sql -name '*.sql' | sed -e 's,\(^sql/\|\.sql$$\),,g')
+REGRESS_OPTS = --load-extension=pgroonga
 
 ifdef DEBUG
 COPT += -O0 -g3 -DPGROONGA_DEBUG=1

  Copied: expected/text/indexscan.out (+3 -3) 89%
===================================================================
--- expected/text/seqscan.out    2015-01-18 22:51:10 +0900 (5be289f)
+++ expected/text/indexscan.out    2015-01-18 22:56:54 +0900 (0c5b028)
@@ -1,4 +1,3 @@
-CREATE EXTENSION pgroonga;
 CREATE TABLE memos (
   id integer,
   content text
@@ -7,8 +6,8 @@ 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.');
 CREATE INDEX grnindex ON memos USING pgroonga (content);
-SET enable_seqscan = on;
-SET enable_indexscan = off;
+SET enable_seqscan = off;
+SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
@@ -19,3 +18,4 @@ SELECT id, content
   3 | PGroonga is a PostgreSQL extension that uses Groonga.
 (2 rows)
 
+DROP TABLE memos;

  Modified: expected/text/seqscan.out (+1 -1)
===================================================================
--- expected/text/seqscan.out    2015-01-18 22:51:10 +0900 (5be289f)
+++ expected/text/seqscan.out    2015-01-18 22:56:54 +0900 (bcdef3b)
@@ -1,4 +1,3 @@
-CREATE EXTENSION pgroonga;
 CREATE TABLE memos (
   id integer,
   content text
@@ -19,3 +18,4 @@ SELECT id, content
   3 | PGroonga is a PostgreSQL extension that uses Groonga.
 (2 rows)
 
+DROP TABLE memos;

  Copied: sql/text/indexscan.sql (+4 -4) 84%
===================================================================
--- sql/text/seqscan.sql    2015-01-18 22:51:10 +0900 (67a7cc9)
+++ sql/text/indexscan.sql    2015-01-18 22:56:54 +0900 (408d1db)
@@ -1,5 +1,3 @@
-CREATE EXTENSION pgroonga;
-
 CREATE TABLE memos (
   id integer,
   content text
@@ -11,10 +9,12 @@ INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groon
 
 CREATE INDEX grnindex ON memos USING pgroonga (content);
 
-SET enable_seqscan = on;
-SET enable_indexscan = off;
+SET enable_seqscan = off;
+SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
  WHERE content %% 'Groonga';
+
+DROP TABLE memos;

  Modified: sql/text/seqscan.sql (+2 -2)
===================================================================
--- sql/text/seqscan.sql    2015-01-18 22:51:10 +0900 (67a7cc9)
+++ sql/text/seqscan.sql    2015-01-18 22:56:54 +0900 (71f638e)
@@ -1,5 +1,3 @@
-CREATE EXTENSION pgroonga;
-
 CREATE TABLE memos (
   id integer,
   content text
@@ -18,3 +16,5 @@ SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
  WHERE content %% 'Groonga';
+
+DROP TABLE memos;
-------------- next part --------------
HTML����������������������������...
Download 



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