OSDN Git Service

Provide upgrade path from 1.1.3
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 21 Feb 2017 00:27:55 +0000 (09:27 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 21 Feb 2017 00:27:55 +0000 (09:27 +0900)
pg_hint_plan96-1.2.0 has an upgrade path from 1.1.3. This adds
requires installation sql file and puts pointers to the files in
Makefile and spec file. It is the only upgrade path of pg_hint_plan
1.2.0 since it works only on PG9.6 and versions earlier than 1.1.3
don't support PG9.6.

Makefile
SPECS/pg_hint_plan96.spec
pg_hint_plan--1.1.3--1.2.0.sql [new file with mode: 0644]

index 38058b2..d74d0b7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ REGRESSION_EXPECTED = expected/init.out expected/base_plan.out expected/pg_hint_
 REGRESS_OPTS = --encoding=UTF8
 
 EXTENSION = pg_hint_plan
-DATA = pg_hint_plan--1.2.0.sql
+DATA = pg_hint_plan--1.2.0.sql pg_hint_plan--1.1.3--1.2.0.sql
 
 EXTRA_CLEAN = sql/ut-fdw.sql expected/ut-fdw.out RPMS
 
index 4054d81..21a10f8 100644 (file)
@@ -58,6 +58,7 @@ install -d %{buildroot}%{_libdir}
 install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
 install -d %{buildroot}%{_datadir}/extension
 install -m 644 pg_hint_plan--1.2.0.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.2.0.sql
+install -m 644 pg_hint_plan--1.1.3--1.2.0.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.3--1.2.0.sql
 install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
 
 %clean
@@ -68,6 +69,7 @@ rm -rf %{buildroot}
 %{_libdir}/pg_hint_plan.so
 %defattr(0644,root,root)
 %{_datadir}/extension/pg_hint_plan--1.2.0.sql
+%{_datadir}/extension/pg_hint_plan--1.1.3--1.2.0.sql
 %{_datadir}/extension/pg_hint_plan.control
 
 # History of pg_hint_plan.
diff --git a/pg_hint_plan--1.1.3--1.2.0.sql b/pg_hint_plan--1.1.3--1.2.0.sql
new file mode 100644 (file)
index 0000000..e5f6949
--- /dev/null
@@ -0,0 +1,6 @@
+/* pg_hint_plan/pg_hint_plan--1.1.3--1.2.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION pg_hint_plan" to load this file. \quit
+
+-- nothing to do upgrading from 1.1.3.