File tree Expand file tree Collapse file tree 9 files changed +746
-1591
lines changed Expand file tree Collapse file tree 9 files changed +746
-1591
lines changed Original file line number Diff line number Diff line change 35
35
- PG_VERSION=13 LEVEL=hardcore
36
36
- PG_VERSION=12
37
37
- PG_VERSION=12 LEVEL=hardcore
38
- - PG_VERSION=11
39
- - PG_VERSION=11 LEVEL=hardcore
40
-
41
- matrix :
42
- allow_failures :
43
- - env : PG_VERSION=11
44
- - env : PG_VERSION=11 LEVEL=hardcore
Original file line number Diff line number Diff line change @@ -30,9 +30,25 @@ REGRESS = security rum rum_validate rum_hash ruminv timestamp orderby orderby_ha
30
30
31
31
TAP_TESTS = 1
32
32
33
+ ISOLATION = predicate-rum predicate-rum-2
34
+ ISOLATION_OPTS = --load-extension=rum
35
+ # Isolation test predicate_rum prints errors with correct output for 12 version
36
+ ifeq ($(MAJORVERSION ) ,$(filter 12% ,$(MAJORVERSION ) ) )
37
+ undefine ISOLATION
38
+ undefine ISOLATION_OPTS
39
+ endif
33
40
EXTRA_CLEAN = pglist_tmp
34
41
35
42
ifdef USE_PGXS
43
+
44
+ # We cannot run isolation test for version 13 in PGXS case
45
+ # because 'pg_isolation_regress' is not copied to install
46
+ # directory, see src/test/isolation/Makefile
47
+ ifeq ($(MAJORVERSION ) ,$(filter 13% ,$(MAJORVERSION ) ) )
48
+ undefine ISOLATION
49
+ undefine ISOLATION_OPTS
50
+ endif
51
+
36
52
PG_CONFIG = pg_config
37
53
PGXS := $(shell $(PG_CONFIG ) --pgxs)
38
54
include $(PGXS )
@@ -60,6 +76,11 @@ wal-check: temp-install
60
76
check : wal-check
61
77
endif
62
78
79
+ #
80
+ # Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
81
+ #
82
+ ifeq ($(MAJORVERSION ) , $(filter 9.6% 10% 11% , $(MAJORVERSION ) ) )
83
+
63
84
install : installincludes
64
85
65
86
installincludes :
@@ -83,3 +104,4 @@ isolationcheck: | submake-isolation submake-rum temp-install
83
104
$(pg_isolation_regress_check ) \
84
105
--temp-config $(top_srcdir ) /contrib/rum/logical.conf \
85
106
$(ISOLATIONCHECKS )
107
+ endif
Load Diff Large diffs are not rendered by default.
Load Diff This file was deleted.
Load Diff Large diffs are not rendered by default.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ rum_sources = files(
24
24
if host_system == ' windows'
25
25
rum_sources += rc_lib_gen.process(win32ver_rc, extra_args : [
26
26
' --NAME' , ' rum' ,
27
- ' --FILEDESC' , ' rum - provides access method to work with the RUM indexes. ' ,])
27
+ ' --FILEDESC' , ' RUM index access method' ,])
28
28
endif
29
29
30
30
rum = shared_module (' rum' ,
@@ -87,10 +87,22 @@ tests += {
87
87
' expr' ,
88
88
' array' ,
89
89
],
90
+ ' regress_args' : [
91
+ ' --temp-config' , files (' logical.conf' )
92
+ ],
90
93
},
91
94
' tap' : {
92
95
' tests' : [
93
96
' t/001_wal.pl' ,
94
97
],
95
98
},
96
- }
99
+ ' isolation' : {
100
+ ' specs' : [
101
+ ' predicate-rum' ,
102
+ ' predicate-rum-2' ,
103
+ ],
104
+ ' regress_args' : [
105
+ ' --temp-config' , files (' logical.conf' ),
106
+ ],
107
+ },
108
+ }
Original file line number Diff line number Diff line change 6
6
7
7
setup
8
8
{
9
- CREATE EXTENSION rum ;
10
-
11
9
CREATE TABLE rum_tbl (id serial , tsv tsvector );
12
10
13
11
CREATE TABLE text_table (id1 serial , t text [ ]);
14
12
15
- SELECT SETSEED (0.5 );
16
-
17
13
INSERT INTO text_table (t ) SELECT array [chr (i ) | | chr (j )] FROM generate_series (65 ,90 ) i ,
18
14
generate_series (65 ,90 ) j ;
19
15
20
- INSERT INTO rum_tbl (tsv ) SELECT to_tsvector ('simple' , t [1 ] ) FROM text_table ;
21
-
16
+ - - We need to use pseudorandom to generate values for test table
17
+ - - In this case we use linear congruential generator because random ()
18
+ - - function may generate different outputs with different systems
22
19
DO $$
20
+ DECLARE
21
+ c integer := 17 ;
22
+ a integer := 261 ;
23
+ m integer := 6760 ;
24
+ Xi integer := 228 ;
23
25
BEGIN
24
- FOR j in 1. .10 LOOP
25
- UPDATE rum_tbl SET tsv = tsv | | q .t1 FROM (SELECT id1 ,to_tsvector ('simple' , t [1 ] )
26
- as t1 FROM text_table ) as q WHERE id = (random ()* q .id1 )::integer ;
26
+ FOR i in 1. .338 LOOP
27
+ INSERT INTO rum_tbl (tsv ) VALUES ('' );
28
+ FOR j in 1. .10 LOOP
29
+ UPDATE rum_tbl SET tsv = tsv | | (SELECT to_tsvector (t [1 ]) FROM text_table WHERE id1 = Xi % 676 + 1 ) WHERE id = i ;
30
+ Xi = (a * Xi + c ) % m ;
31
+ END LOOP ;
27
32
END LOOP ;
28
33
END ;
29
34
$$;
@@ -35,7 +40,6 @@ teardown
35
40
{
36
41
DROP TABLE text_table ;
37
42
DROP TABLE rum_tbl ;
38
- DROP EXTENSION rum ;
39
43
}
40
44
41
45
session "s1"
Original file line number Diff line number Diff line change 6
6
7
7
setup
8
8
{
9
- CREATE EXTENSION rum ;
10
-
11
9
CREATE TABLE rum_tbl (id serial , tsv tsvector );
12
10
13
11
CREATE TABLE text_table (id1 serial , t text [ ]);
14
12
15
- SELECT SETSEED (0.5 );
16
-
17
13
INSERT INTO text_table (t ) SELECT array [chr (i ) | | chr (j )] FROM generate_series (65 ,90 ) i ,
18
14
generate_series (65 ,90 ) j ;
19
15
20
- INSERT INTO rum_tbl (tsv ) SELECT to_tsvector ('simple' , t [1 ] ) FROM text_table ;
21
-
16
+ - - We need to use pseudorandom to generate values for test table
17
+ - - In this case we use linear congruential generator because random ()
18
+ - - function may generate different outputs with different systems
22
19
DO $$
20
+ DECLARE
21
+ c integer := 17 ;
22
+ a integer := 261 ;
23
+ m integer := 6760 ;
24
+ Xi integer := 228 ;
23
25
BEGIN
24
- FOR j in 1. .10 LOOP
25
- UPDATE rum_tbl SET tsv = tsv | | q .t1 FROM (SELECT id1 ,to_tsvector ('simple' , t [1 ] )
26
- as t1 FROM text_table ) as q WHERE id = (random ()* q .id1 )::integer ;
26
+ FOR i in 1. .338 LOOP
27
+ INSERT INTO rum_tbl (tsv ) VALUES ('' );
28
+ FOR j in 1. .10 LOOP
29
+ UPDATE rum_tbl SET tsv = tsv | | (SELECT to_tsvector (t [1 ]) FROM text_table WHERE id1 = Xi % 676 + 1 ) WHERE id = i ;
30
+ Xi = (a * Xi + c ) % m ;
31
+ END LOOP ;
27
32
END LOOP ;
28
33
END ;
29
34
$$;
@@ -35,7 +40,6 @@ teardown
35
40
{
36
41
DROP TABLE text_table ;
37
42
DROP TABLE rum_tbl ;
38
- DROP EXTENSION rum ;
39
43
}
40
44
41
45
session "s1"
You can’t perform that action at this time.
0 commit comments