Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02e7c0d

Browse files
[PGPRO-9336] Fix of isolation tests and beautify makefile
1 parent9e78b97 commit02e7c0d

File tree

8 files changed

+721
-1586
lines changed

8 files changed

+721
-1586
lines changed

‎.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ env:
3333
-PG_VERSION=13 LEVEL=hardcore
3434
-PG_VERSION=12
3535
-PG_VERSION=12 LEVEL=hardcore
36-
-PG_VERSION=11
37-
-PG_VERSION=11 LEVEL=hardcore

‎Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ REGRESS = security rum rum_validate rum_hash ruminv timestamp orderby orderby_ha
3434

3535
TAP_TESTS = 1
3636

37+
ISOLATION = predicate-rum predicate-rum-2
38+
ISOLATION_OPTS = --load-extension=rum
39+
EXTRA_CLEAN = pglist_tmp
40+
3741
ifdefUSE_PGXS
3842
PG_CONFIG = pg_config
3943
PGXS :=$(shell$(PG_CONFIG) --pgxs)
@@ -51,6 +55,14 @@ else
5155
REGRESS += array
5256
endif
5357

58+
# We cannot run isolation test for versions 12,13 in PGXS case
59+
# because 'pg_isolation_regress' is not copied to install
60+
# directory, see src/test/isolation/Makefile
61+
ifeq ($(MAJORVERSION),$(filter 12% 13%,$(MAJORVERSION)))
62+
undefineISOLATION
63+
undefineISOLATION_OPTS
64+
endif
65+
5466
# For 9.6-11 we have to make specific target with tap tests
5567
ifeq ($(MAJORVERSION),$(filter 9.6% 10% 11%,$(MAJORVERSION)))
5668
wal-check: temp-install
@@ -69,8 +81,10 @@ rum--$(EXTVERSION).sql: $(DATA_first) $(DATA_updates)
6981
rum--%.sql: gen_rum_sql--%.pl
7082
perl$<>$@
7183

72-
install: installincludes
73-
84+
#
85+
# Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
86+
#
87+
ifeq ($(MAJORVERSION),$(filter 9.6% 10% 11%,$(MAJORVERSION)))
7488
installincludes:
7589
$(INSTALL) -d'$(DESTDIR)$(includedir_server)/'
7690
$(INSTALL_DATA)$(addprefix$(srcdir)/,$(RELATIVE_INCLUDES))'$(DESTDIR)$(includedir_server)/'
@@ -92,3 +106,4 @@ isolationcheck: | submake-isolation submake-rum temp-install
92106
$(pg_isolation_regress_check)\
93107
--temp-config$(top_srcdir)/contrib/rum/logical.conf\
94108
$(ISOLATIONCHECKS)
109+
endif

‎expected/predicate-rum-2.out

Lines changed: 340 additions & 260 deletions
Large diffs are not rendered by default.

‎expected/predicate-rum-2_1.out

Lines changed: 0 additions & 501 deletions
This file was deleted.

‎expected/predicate-rum.out

Lines changed: 342 additions & 280 deletions
Large diffs are not rendered by default.

‎expected/predicate-rum_1.out

Lines changed: 0 additions & 521 deletions
This file was deleted.

‎specs/predicate-rum-2.spec

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@
66

77
setup
88
{
9-
CREATEEXTENSIONrum;
10-
119
CREATETABLErum_tbl (idserial,tsvtsvector);
1210

1311
CREATETABLEtext_table (id1serial,ttext[]);
1412

15-
SELECTSETSEED(0.5);
16-
1713
INSERTINTOtext_table(t)SELECTarray[chr(i)||chr(j)]FROMgenerate_series(65,90)i,
1814
generate_series(65,90)j ;
1915

20-
INSERTINTOrum_tbl(tsv)SELECTto_tsvector('simple',t[1] )FROMtext_table;
21-
2216
DO $$
17+
DECLARE
18+
cinteger:=17;
19+
ainteger:=261;
20+
minteger:=6760;
21+
Xiinteger:=228;
2322
BEGIN
24-
FORjin1..10LOOP
25-
UPDATErum_tblSETtsv=tsv||q.t1FROM (SELECTid1,to_tsvector('simple',t[1] )
26-
ast1FROMtext_table)asqWHEREid= (random()*q.id1)::integer;
23+
FORiin1..338LOOP
24+
INSERTINTOrum_tbl(tsv)VALUES ('');
25+
FORjin1..10LOOP
26+
UPDATErum_tblSETtsv=tsv|| (SELECTto_tsvector(t[1])FROMtext_tableWHEREid1=Xi%676+1)WHEREid=i;
27+
Xi= (a*Xi+c)%m;
28+
ENDLOOP;
2729
ENDLOOP;
2830
END;
2931
$$;
@@ -35,7 +37,6 @@ teardown
3537
{
3638
DROPTABLEtext_table;
3739
DROPTABLErum_tbl;
38-
DROPEXTENSIONrum;
3940
}
4041

4142
session"s1"

‎specs/predicate-rum.spec

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@
66

77
setup
88
{
9-
CREATEEXTENSIONrum;
10-
119
CREATETABLErum_tbl (idserial,tsvtsvector);
1210

1311
CREATETABLEtext_table (id1serial,ttext[]);
1412

15-
SELECTSETSEED(0.5);
16-
1713
INSERTINTOtext_table(t)SELECTarray[chr(i)||chr(j)]FROMgenerate_series(65,90)i,
1814
generate_series(65,90)j ;
1915

20-
INSERTINTOrum_tbl(tsv)SELECTto_tsvector('simple',t[1] )FROMtext_table;
21-
2216
DO $$
17+
DECLARE
18+
cinteger:=17;
19+
ainteger:=261;
20+
minteger:=6760;
21+
Xiinteger:=228;
2322
BEGIN
24-
FORjin1..10LOOP
25-
UPDATErum_tblSETtsv=tsv||q.t1FROM (SELECTid1,to_tsvector('simple',t[1] )
26-
ast1FROMtext_table)asqWHEREid= (random()*q.id1)::integer;
23+
FORiin1..338LOOP
24+
INSERTINTOrum_tbl(tsv)VALUES ('');
25+
FORjin1..10LOOP
26+
UPDATErum_tblSETtsv=tsv|| (SELECTto_tsvector(t[1])FROMtext_tableWHEREid1=Xi%676+1)WHEREid=i;
27+
Xi= (a*Xi+c)%m;
28+
ENDLOOP;
2729
ENDLOOP;
2830
END;
2931
$$;
@@ -35,7 +37,6 @@ teardown
3537
{
3638
DROPTABLEtext_table;
3739
DROPTABLErum_tbl;
38-
DROPEXTENSIONrum;
3940
}
4041

4142
session"s1"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp