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 3535 - PG_VERSION=13 LEVEL=hardcore
3636 - PG_VERSION=12
3737 - 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
3030
3131TAP_TESTS = 1
3232
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
3340EXTRA_CLEAN = pglist_tmp
3441
3542ifdef 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+
3652PG_CONFIG = pg_config
3753PGXS := $(shell $(PG_CONFIG ) --pgxs)
3854include $(PGXS )
@@ -60,6 +76,11 @@ wal-check: temp-install
6076check : wal-check
6177endif
6278
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+
6384install : installincludes
6485
6586installincludes :
@@ -83,3 +104,4 @@ isolationcheck: | submake-isolation submake-rum temp-install
83104 $(pg_isolation_regress_check ) \
84105 --temp-config $(top_srcdir ) /contrib/rum/logical.conf \
85106 $(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(
2424if host_system == ' windows'
2525 rum_sources += rc_lib_gen.process(win32ver_rc, extra_args : [
2626 ' --NAME' , ' rum' ,
27- ' --FILEDESC' , ' rum - provides access method to work with the RUM indexes. ' ,])
27+ ' --FILEDESC' , ' RUM index access method' ,])
2828endif
2929
3030rum = shared_module (' rum' ,
@@ -87,10 +87,22 @@ tests += {
8787 ' expr' ,
8888 ' array' ,
8989 ],
90+ ' regress_args' : [
91+ ' --temp-config' , files (' logical.conf' )
92+ ],
9093 },
9194 ' tap' : {
9295 ' tests' : [
9396 ' t/001_wal.pl' ,
9497 ],
9598 },
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 66
77setup
88{
9- CREATE EXTENSION rum ;
10-
119 CREATE TABLE rum_tbl (id serial , tsv tsvector );
1210
1311 CREATE TABLE text_table (id1 serial , t text [ ]);
1412
15- SELECT SETSEED (0.5 );
16-
1713 INSERT INTO text_table (t ) SELECT array [chr (i ) | | chr (j )] FROM generate_series (65 ,90 ) i ,
1814 generate_series (65 ,90 ) j ;
1915
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
2219 DO $$
20+ DECLARE
21+ c integer := 17 ;
22+ a integer := 261 ;
23+ m integer := 6760 ;
24+ Xi integer := 228 ;
2325 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 ;
2732 END LOOP ;
2833 END ;
2934 $$;
@@ -35,7 +40,6 @@ teardown
3540{
3641 DROP TABLE text_table ;
3742 DROP TABLE rum_tbl ;
38- DROP EXTENSION rum ;
3943}
4044
4145session "s1"
Original file line number Diff line number Diff line change 66
77setup
88{
9- CREATE EXTENSION rum ;
10-
119 CREATE TABLE rum_tbl (id serial , tsv tsvector );
1210
1311 CREATE TABLE text_table (id1 serial , t text [ ]);
1412
15- SELECT SETSEED (0.5 );
16-
1713 INSERT INTO text_table (t ) SELECT array [chr (i ) | | chr (j )] FROM generate_series (65 ,90 ) i ,
1814 generate_series (65 ,90 ) j ;
1915
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
2219 DO $$
20+ DECLARE
21+ c integer := 17 ;
22+ a integer := 261 ;
23+ m integer := 6760 ;
24+ Xi integer := 228 ;
2325 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 ;
2732 END LOOP ;
2833 END ;
2934 $$;
@@ -35,7 +40,6 @@ teardown
3540{
3641 DROP TABLE text_table ;
3742 DROP TABLE rum_tbl ;
38- DROP EXTENSION rum ;
3943}
4044
4145session "s1"
You can’t perform that action at this time.
0 commit comments