Skip to content

Commit d959bdf

Browse files
irionrtuhaihe
authored andcommitted
Bump to version 12.
Test for all versions from 9.5 to 12. Rework makefile Signed-off-by: Florin Irion <florin.irion@2ndquadrant.com>
1 parent eafd44f commit d959bdf

2 files changed

Lines changed: 21 additions & 20 deletions

File tree

contrib/fixeddecimal/Makefile

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,16 @@ MODULE_big = fixeddecimal
22
OBJS = fixeddecimal.o
33

44
EXTENSION = fixeddecimal
5-
AGGSTATESQL := $(shell pg_config --version | grep -qE "XL" && echo fixeddecimalaggstate.sql)
6-
AGGFUNCSSQL := $(shell pg_config --version | grep -qE "XL" && echo fixeddecimal--xlaggs.sql)
7-
8-
AGGFUNCSSQL := $(shell pg_config --version | grep -qE "9\.[6-9]| 10\.[0-9]" && echo fixeddecimal--parallelaggs.sql || echo fixeddecimal--aggs.sql)
9-
10-
BRINSQL := $(shell pg_config --version | grep -qE "9\.[5-9]| 10\.[0-9]" && echo fixeddecimal--brin.sql)
11-
12-
# 9.6 was the dawn of parallel query, so we'll use the parallel enabled .sql file from then on.
13-
BASESQL := $(shell pg_config --version | grep -qE "9\.[6-9]| 10\.[0-9]" && echo fixeddecimal--1.1.0_base_parallel.sql || echo fixeddecimal--1.1.0_base.sql)
14-
15-
SQLFILES := $(shell cat $(AGGSTATESQL) $(BASESQL) $(AGGFUNCSSQL) $(BRINSQL) > fixeddecimal--1.1.0.sql)
16-
17-
DATA = fixeddecimal--1.1.0.sql fixeddecimal--1.0.0--1.1.0.sql
185

19-
MODULES = fixeddecimal
6+
DATA = fixeddecimal--1.0.0--1.1.0.sql
7+
DATA_built = fixeddecimal--1.1.0.sql
208

21-
CFLAGS =`pg_config --includedir-server`
9+
CFLAGS = `pg_config --includedir-server`
2210

2311
TESTS = $(wildcard test/sql/*.sql)
2412

25-
REGRESS_BRIN := $(shell pg_config --version | grep -qE "XL 9\.[5-9]| 10\.0" && echo brin-xl)
26-
REGRESS_BRIN += $(shell pg_config --version | grep -E "9\.[5-9]| 10\.0" | grep -qEv "XL" && echo brin)
13+
REGRESS_BRIN := $(shell pg_config --version | grep -qE "XL 9\.[5-9]| 10\.0| 11\.[0-9]| 12\.[0-9]" && echo brin-xl)
14+
REGRESS_BRIN += $(shell pg_config --version | grep -E "9\.[5-9]| 10\.0| 11\.[0-9]| 12\.[0-9]" | grep -qEv "XL" && echo brin)
2715
REGRESS_VERSION_SPECIFIC := $(shell pg_config --version | grep -qE "XL" && echo index-xl || echo index)
2816
REGRESS = $(shell echo aggregate cast comparison overflow $(REGRESS_BRIN) $(REGRESS_VERSION_SPECIFIC))
2917

@@ -33,6 +21,18 @@ PG_CONFIG = pg_config
3321
PGXS := $(shell $(PG_CONFIG) --pgxs)
3422
include $(PGXS)
3523

36-
fixeddecimal.so: fixeddecimal.o
24+
AGGSTATESQL := $(shell pg_config --version | grep -qE "XL" && echo fixeddecimalaggstate.sql)
25+
AGGFUNCSSQL := $(shell pg_config --version | grep -qE "XL" && echo fixeddecimal--xlaggs.sql)
26+
27+
AGGFUNCSSQL := $(shell pg_config --version | grep -qE "9\.[6-9]| 10\.[0-9]| 11\.[0-9]| 12\.[0-9]" && echo fixeddecimal--parallelaggs.sql || echo fixeddecimal--aggs.sql)
28+
29+
BRINSQL := $(shell pg_config --version | grep -qE "9\.[5-9]| 10\.[0-9]| 11\.[0-9]| 12\.[0-9]" && echo fixeddecimal--brin.sql)
30+
31+
# 9.6 was the dawn of parallel query, so we'll use the parallel enabled .sql file from then on.
32+
BASESQL := $(shell pg_config --version | grep -qE "9\.[6-9]| 10\.[0-9]| 11\.[0-9]| 12\.[0-9]" && echo fixeddecimal--1.1.0_base_parallel.sql || echo fixeddecimal--1.1.0_base.sql)
33+
34+
OBJECTS := $(addprefix $(srcdir)/, $(AGGSTATESQL) $(BASESQL) $(AGGFUNCSSQL) $(BRINSQL))
35+
36+
fixeddecimal--1.1.0.sql: $(OBJECTS)
37+
cat $^ > $@
3738

38-
fixeddecimal.o: fixeddecimal.c

contrib/fixeddecimal/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FIXEDDECIMAL
22
============
33

4-
Works with PostgreSQL 9.5 and Postgres-XL 9.5
4+
Works with PostgreSQL 9.5 or higher.
5+
The latest test was executed on version 12.
56

67
Overview
78
--------

0 commit comments

Comments
 (0)