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

Commit88a4b33

Browse files
committed
Add contib/pg_hint_plan 1.1.3
1 parent6820e3f commit88a4b33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+50384
-1
lines changed

‎contrib/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ SUBDIRS = \
6262
sr_plan\
6363
pg_arman\
6464
pg_pathman\
65-
shared_ispell
65+
shared_ispell\
66+
pg_hint_plan
6667

6768
ifeq ($(with_openssl),yes)
6869
SUBDIRS += sslinfo

‎contrib/pg_hint_plan/COPYRIGHT

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2012-2016, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
* Neither the name of the NIPPON TELEGRAPH AND TELEPHONE CORPORATION
13+
(NTT) nor the names of its contributors may be used to endorse or
14+
promote products derived from this software without specific prior
15+
written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
core.c and make_join_rel.c are parts of PostgreSQL Database Management System.
2+
(formerly known as Postgres, then as Postgres95)
3+
Copyright holders of those files are following organizations:
4+
5+
Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
6+
7+
Portions Copyright (c) 1994, The Regents of the University of California
8+
9+
Permission to use, copy, modify, and distribute this software and its
10+
documentation for any purpose, without fee, and without a written agreement
11+
is hereby granted, provided that the above copyright notice and this
12+
paragraph and the following two paragraphs appear in all copies.
13+
14+
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
15+
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
16+
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
17+
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
18+
POSSIBILITY OF SUCH DAMAGE.
19+
20+
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
21+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22+
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23+
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
24+
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

‎contrib/pg_hint_plan/Makefile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# pg_hint_plan: Makefile
3+
#
4+
# Copyright (c) 2012-2016, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
5+
#
6+
7+
MODULES = pg_hint_plan
8+
HINTPLANVER = 1.1.3
9+
10+
REGRESS = init base_plan pg_hint_plan ut-init ut-A ut-S ut-J ut-L ut-G ut-R ut-fdw ut-fini
11+
12+
REGRESSION_EXPECTED = expected/init.out expected/base_plan.out expected/pg_hint_plan.out expected/ut-A.out expected/ut-S.out expected/ut-J.out expected/ut-L.out expected/ut-G.out
13+
14+
REGRESS_OPTS = --encoding=UTF8
15+
16+
EXTENSION = pg_hint_plan
17+
DATA = pg_hint_plan--1.1.3.sql
18+
19+
EXTRA_CLEAN = sql/ut-fdw.sql expected/ut-fdw.out
20+
21+
ifdefUSE_PGXS
22+
PG_CONFIG = pg_config
23+
PGXS :=$(shell$(PG_CONFIG) --pgxs)
24+
include$(PGXS)
25+
else
26+
subdir = contrib/pg_hint_plan
27+
top_builddir = ../..
28+
include$(top_builddir)/src/Makefile.global
29+
include$(top_srcdir)/contrib/contrib-global.mk
30+
overrideCFLAGS += -I$(top_builddir)/src/pl/plpgsql/src
31+
REGRESS = init base_plan pg_hint_plan
32+
endif
33+
34+
STARBALL96 = pg_hint_plan96-$(HINTPLANVER).tar.gz
35+
STARBALLS =$(STARBALL96)
36+
37+
TARSOURCES = Makefile *.c *.h COPYRIGHT*\
38+
pg_hint_plan--*.sql\
39+
pg_hint_plan.control\
40+
doc/* expected/*.out sql/*.sql sql/maskout.sh\
41+
data/data.csv input/*.source output/*.source SPECS/*.spec
42+
43+
installcheck:$(REGRESSION_EXPECTED)
44+
45+
rpms: rpm96
46+
47+
# pg_hint_plan.c includes core.c and make_join_rel.c
48+
pg_hint_plan.o: core.c make_join_rel.c# pg_stat_statements.c
49+
50+
$(STARBALLS):$(TARSOURCES)
51+
if [-h$(subst .tar.gz,,$@) ];then rm$(subst .tar.gz,,$@);fi
52+
if [-e$(subst .tar.gz,,$@) ];then \
53+
echo"$(subst .tar.gz,,$@) is not a symlink. Stop.";\
54+
exit 1;\
55+
fi
56+
ln -s.$(subst .tar.gz,,$@)
57+
tar -chzf$@$(addprefix$(subst .tar.gz,,$@)/,$^)
58+
rm$(subst .tar.gz,,$@)
59+
60+
rpm96:$(STARBALL96)
61+
MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan96.spec
62+
63+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPEC file for pg_store_plans
2+
# Copyright(C) 2016 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
3+
4+
%define _pgdir /usr/pgsql-9.6
5+
%define _bindir %{_pgdir}/bin
6+
%define _libdir %{_pgdir}/lib
7+
%define _datadir %{_pgdir}/share
8+
%if "%(echo ${MAKE_ROOT})"!= ""
9+
%define _rpmdir %(echo ${MAKE_ROOT})/RPMS
10+
%define _sourcedir %(echo ${MAKE_ROOT})
11+
%endif
12+
13+
## Set general information for pg_store_plans.
14+
Summary: Optimizer hint on PostgreSQL 9.6
15+
Name: pg_hint_plan96
16+
Version: 1.1.3
17+
Release: 1%{?dist}
18+
License: BSD
19+
Group: Applications/Databases
20+
Source0: %{name}-%{version}.tar.gz
21+
#URL: http://example.com/pg_hint_plan/
22+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
23+
Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
24+
25+
## We use postgresql-devel package
26+
BuildRequires: postgresql96-devel
27+
Requires: postgresql96-libs
28+
29+
## Description for "pg_hint_plan"
30+
%description
31+
32+
pg_hint_plan provides capability to tweak execution plans to be
33+
executed on PostgreSQL.
34+
35+
Note that this package is available for only PostgreSQL 9.6.
36+
37+
## pre work for build pg_hint_plan
38+
%prep
39+
PATH=/usr/pgsql-9.6/bin:$PATH
40+
if ["${MAKE_ROOT}"!="" ];then
41+
pushd${MAKE_ROOT}
42+
make clean %{name}-%{version}.tar.gz
43+
popd
44+
fi
45+
if [!-d %{_rpmdir} ];then mkdir -p %{_rpmdir};fi
46+
%setup -q
47+
48+
## Set variables for build environment
49+
%build
50+
PATH=/usr/pgsql-9.6/bin:$PATH
51+
make USE_PGXS=1 %{?_smp_mflags}
52+
53+
## Set variables for install
54+
%install
55+
rm -rf %{buildroot}
56+
install -d %{buildroot}%{_libdir}
57+
install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
58+
install -d %{buildroot}%{_datadir}/extension
59+
install -m 644 pg_hint_plan--1.1.3.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.1.3.sql
60+
install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
61+
62+
%clean
63+
rm -rf %{buildroot}
64+
65+
%files
66+
%defattr(0755,root,root)
67+
%{_libdir}/pg_hint_plan.so
68+
%defattr(0644,root,root)
69+
%{_datadir}/extension/pg_hint_plan--1.1.3.sql
70+
%{_datadir}/extension/pg_hint_plan.control
71+
72+
# History of pg_hint_plan.
73+
%changelog
74+
* Thu Jul 21 2016 Kyotaro Horiguchi
75+
-Support PostgreSQL 9.6

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp