File tree 9 files changed +741
-1591
lines changed
Filter options
9 files changed +741
-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,20 @@ 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
33
35
EXTRA_CLEAN = pglist_tmp
34
36
35
37
ifdef USE_PGXS
38
+
39
+ # We cannot run isolation test for versions 12,13 in PGXS case
40
+ # because 'pg_isolation_regress' is not copied to install
41
+ # directory, see src/test/isolation/Makefile
42
+ ifeq ($(MAJORVERSION ) ,$(filter 12% 13% ,$(MAJORVERSION ) ) )
43
+ undefine ISOLATION
44
+ undefine ISOLATION_OPTS
45
+ endif
46
+
36
47
PG_CONFIG = pg_config
37
48
PGXS := $(shell $(PG_CONFIG ) --pgxs)
38
49
include $(PGXS )
@@ -60,6 +71,11 @@ wal-check: temp-install
60
71
check : wal-check
61
72
endif
62
73
74
+ #
75
+ # Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
76
+ #
77
+ ifeq ($(MAJORVERSION ) , $(filter 9.6% 10% 11% , $(MAJORVERSION ) ) )
78
+
63
79
install : installincludes
64
80
65
81
installincludes :
@@ -83,3 +99,4 @@ isolationcheck: | submake-isolation submake-rum temp-install
83
99
$(pg_isolation_regress_check ) \
84
100
--temp-config $(top_srcdir ) /contrib/rum/logical.conf \
85
101
$(ISOLATIONCHECKS )
102
+ 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