@@ -8,10 +8,20 @@ EXTVERSION = 1.1
88DATA = pg_query_state--1.0--1.1.sql
99DATA_built = $(EXTENSION ) --$(EXTVERSION ) .sql
1010PGFILEDESC = "pg_query_state - facility to track progress of plan execution"
11- EXTRA_REGRESS_OPTS=--temp-config = $( top_srcdir ) / $( subdir ) /test.conf
11+
1212EXTRA_CLEAN = ./isolation_output $(EXTENSION ) --$(EXTVERSION ) .sql \
1313 Dockerfile ./tests/*.pyc ./tmp_stress
1414
15+ ISOLATION = corner_cases
16+ #
17+ # PG11 doesn't support ISOLATION_OPTS variable. We have to use
18+ # "CREATE/DROP EXTENTION" command in spec.
19+ #
20+ # One day, when we'll get rid of PG11, it will be possible to uncomment this
21+ # variable and remove "CREATE EXTENTION" from spec.
22+ #
23+ # ISOLATION_OPTS = --load-extension=pg_query_state
24+
1525ifdef USE_PGXS
1626PG_CONFIG ?= pg_config
1727PGXS := $(shell $(PG_CONFIG ) --pgxs)
@@ -21,11 +31,17 @@ subdir = contrib/pg_query_state
2131top_builddir = ../..
2232include $(top_builddir ) /src/Makefile.global
2333include $(top_srcdir ) /contrib/contrib-global.mk
34+ # need this to provide make check in case of "in source" build
35+ EXTRA_REGRESS_OPTS=--temp-config =$(top_srcdir ) /$(subdir ) /test.conf
2436endif
2537
2638$(EXTENSION ) --$(EXTVERSION ) .sql : init.sql
2739 cat $^ > $@
2840
41+ #
42+ # Make conditional targets to save backward compatibility with PG11.
43+ #
44+ ifeq ($(MAJORVERSION ) ,11)
2945ISOLATIONCHECKS = corner_cases
3046
3147check : isolationcheck
@@ -46,3 +62,4 @@ submake-isolation:
4662 $(MAKE ) -C $(top_builddir ) /src/test/isolation all
4763
4864temp-install : EXTRA_INSTALL=contrib/pg_query_state
65+ endif
0 commit comments