Skip to content

Commit d1fbad7

Browse files
committed
Change database name variable, because make check clears PGDATABASE variable out for some reason
1 parent e8fa985 commit d1fbad7

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

contrib/pg_hint_plan/Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ include $(top_builddir)/src/Makefile.global
3131
include $(top_srcdir)/contrib/contrib-global.mk
3232
override CFLAGS += -I$(top_srcdir)/src/pl/plpgsql/src
3333
endif
34+
3435
ifneq ($(USE_MODULE_DB),)
35-
PGDATABASE=$(CONTRIB_TESTDB_MODULE)
36+
PGHPBASE=$(CONTRIB_TESTDB_MODULE)
3637
else
37-
PGDATABASE=$(CONTRIB_TESTDB)
38+
PGHPBASE=$(CONTRIB_TESTDB)
3839
endif
39-
export PGDATABASE
40-
40+
export PGHPBASE
4141
STARBALL96 = pg_hint_plan96-$(HINTPLANVER).tar.gz
4242
STARBALLS = $(STARBALL96)
4343

@@ -66,5 +66,3 @@ $(STARBALLS): $(TARSOURCES)
6666

6767
rpm96: $(STARBALL96)
6868
MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan96.spec
69-
70-

contrib/pg_hint_plan/expected/ut-S.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5026,7 +5026,7 @@ error hint:
50265026
---- No. S-3-5 not used index
50275027
----
50285028
-- No. S-3-5-1
5029-
\! psql ${PGDATABASE} -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5029+
\! psql ${PGHPBASE} -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50305030
LOG: statement: /*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50315031
LOG: available indexes for IndexScan(ti1): ti1_pred
50325032
LOG: pg_hint_plan:
@@ -5043,7 +5043,7 @@ error hint:
50435043
(2 rows)
50445044

50455045
-- No. S-3-5-2
5046-
\! psql ${PGDATABASE} -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5046+
\! psql ${PGHPBASE} -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50475047
LOG: statement: /*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50485048
LOG: available indexes for BitmapScan(ti1): ti1_pred
50495049
LOG: pg_hint_plan:
@@ -5060,7 +5060,7 @@ error hint:
50605060
(2 rows)
50615061

50625062
-- No. S-3-5-3
5063-
\! psql ${PGDATABASE} -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5063+
\! psql ${PGHPBASE} -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50645064
LOG: statement: /*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100
50655065
LOG: available indexes for IndexOnlyScan(ti1): ti1_pred
50665066
LOG: pg_hint_plan:
@@ -5077,7 +5077,7 @@ error hint:
50775077
(2 rows)
50785078

50795079
-- No. S-3-5-4
5080-
\! psql ${PGDATABASE} -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5080+
\! psql ${PGHPBASE} -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50815081
LOG: statement: /*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50825082
LOG: available indexes for IndexScan(ti1):
50835083
LOG: pg_hint_plan:
@@ -5094,7 +5094,7 @@ error hint:
50945094
(2 rows)
50955095

50965096
-- No. S-3-5-5
5097-
\! psql ${PGDATABASE} -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5097+
\! psql ${PGHPBASE} -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50985098
LOG: statement: /*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50995099
LOG: available indexes for BitmapScan(ti1):
51005100
LOG: pg_hint_plan:
@@ -5111,7 +5111,7 @@ error hint:
51115111
(2 rows)
51125112

51135113
-- No. S-3-5-6
5114-
\! psql ${PGDATABASE} -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5114+
\! psql ${PGHPBASE} -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
51155115
LOG: statement: /*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100
51165116
LOG: available indexes for IndexOnlyScan(ti1):
51175117
LOG: pg_hint_plan:
@@ -5136,7 +5136,7 @@ LOG: statement: EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
51365136
Index Cond: (c1 = 1)
51375137
(2 rows)
51385138

5139-
\! psql ${PGDATABASE} -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
5139+
\! psql ${PGHPBASE} -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
51405140
LOG: statement: /*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1
51415141
LOG: pg_hint_plan:
51425142
used hint:

contrib/pg_hint_plan/sql/ut-S.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -807,26 +807,26 @@ EXPLAIN (COSTS false) SELECT c2 FROM s1.ti1 WHERE c2 >= 1;
807807
----
808808

809809
-- No. S-3-5-1
810-
\! psql ${PGDATABASE} -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
810+
\! psql ${PGHPBASE} -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
811811

812812
-- No. S-3-5-2
813-
\! psql ${PGDATABASE} -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
813+
\! psql ${PGHPBASE} -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
814814

815815
-- No. S-3-5-3
816-
\! psql ${PGDATABASE} -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
816+
\! psql ${PGHPBASE} -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
817817

818818
-- No. S-3-5-4
819-
\! psql ${PGDATABASE} -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
819+
\! psql ${PGHPBASE} -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
820820

821821
-- No. S-3-5-5
822-
\! psql ${PGDATABASE} -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
822+
\! psql ${PGHPBASE} -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
823823

824824
-- No. S-3-5-6
825-
\! psql ${PGDATABASE} -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
825+
\! psql ${PGHPBASE} -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
826826

827827
-- No. S-3-5-7
828828
EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
829-
\! psql ${PGDATABASE} -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
829+
\! psql ${PGHPBASE} -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
830830

831831
----
832832
---- No. S-3-6 query structure

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy