Skip to content

Commit 69cc976

Browse files
Masahiko Sakamotodvarrazzo
authored andcommitted
Updated regression tests to use CREATE EXTENSION for PostgreSQL 9.1 or higher.
1 parent e9d4ef2 commit 69cc976

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

bin/Makefile

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# pg_reorg: bin/Makefile
33
#
4-
# Portions Copyright (c) 2008-2011, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
4+
# Portions Copyright (c) 2008-2012, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
55
# Portions Copyright (c) 2011, Itagaki Takahiro
66
#
77
SRCS = pg_reorg.c pgut/pgut.c pgut/pgut-fe.c
@@ -37,3 +37,31 @@ endif
3737
# remove dependency to libxml2 and libxslt
3838
LIBS := $(filter-out -lxml2, $(LIBS))
3939
LIBS := $(filter-out -lxslt, $(LIBS))
40+
41+
ifndef MAJORVERSION
42+
MAJORVERSION := $(basename $(VERSION))
43+
endif
44+
45+
sql/init.sql: sql/init-$(MAJORVERSION).sql
46+
cp sql/init-$(MAJORVERSION).sql sql/init.sql
47+
expected/init.out: expected/init-$(MAJORVERSION).out
48+
cp expected/init-$(MAJORVERSION).out expected/init.out
49+
sql/init-8.3.sql:
50+
cp sql/init-legacy.sql sql/init-8.3.sql
51+
sql/init-8.4.sql:
52+
cp sql/init-legacy.sql sql/init-8.4.sql
53+
sql/init-9.0.sql:
54+
cp sql/init-legacy.sql sql/init-9.0.sql
55+
sql/init-9.1.sql:
56+
cp sql/init-extension.sql sql/init-9.1.sql
57+
sql/init-9.2.sql:
58+
cp sql/init-extension.sql sql/init-9.2.sql
59+
sql/init-9.3.sql:
60+
cp sql/init-extension.sql sql/init-9.3.sql
61+
62+
.PHONY: subclean
63+
clean: subclean
64+
subclean:
65+
rm -f sql/init.sql sql/init-{8.3,8.4,9.0,9.1,9.2,9.3}.sql
66+
67+
installcheck: sql/init.sql

bin/sql/init-extension.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SET client_min_messages = warning;
2+
\set ECHO none
3+
CREATE EXTENSION pg_reorg;
4+
\set ECHO all
5+
RESET client_min_messages;
File renamed without changes.

0 commit comments

Comments
 (0)