• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision8be12b9c4f96953db5e25b7249f2819455622f1a (tree)
Time2013-08-08 09:39:50
AuthorTakashi Suzuki <suzuki.takashi@metr...>
CommiterTakashi Suzuki

Log Message

リグレッションテストをヒント用テーブルの定義変更後の形に変更した。

Change Summary

Incremental Difference

--- a/expected/pg_hint_plan-9.1.out
+++ b/expected/pg_hint_plan-9.1.out
@@ -7878,7 +7878,7 @@ error hint:
78787878 (20 rows)
78797879
78807880 -- search from hint table
7881-INSERT INTO hint_plan.hints VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
7881+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints) VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
78827882 SET pg_hint_plan.enable_hint_table = on;
78837883 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = 1;
78847884 LOG: pg_hint_plan:
--- a/expected/pg_hint_plan-9.2.out
+++ b/expected/pg_hint_plan-9.2.out
@@ -7966,7 +7966,7 @@ error hint:
79667966 (20 rows)
79677967
79687968 -- search from hint table
7969-INSERT INTO hint_plan.hints VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
7969+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints) VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
79707970 SET pg_hint_plan.enable_hint_table = on;
79717971 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = 1;
79727972 LOG: pg_hint_plan:
--- a/expected/ut-A-9.1.out
+++ b/expected/ut-A-9.1.out
@@ -172,14 +172,15 @@ EXPLAIN (COSTS false) SELECT * /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
172172 SET pg_hint_plan.enable_hint_table TO on;
173173 -- No. A-6-1-1
174174 \d hint_plan.hints
175- Table "hint_plan.hints"
176- Column | Type | Modifiers
177--------------------+------+-----------
178- norm_query_string | text | not null
179- application_name | text | not null
180- hints | text | not null
175+ Table "hint_plan.hints"
176+ Column | Type | Modifiers
177+-------------------+---------+--------------------------------------------------------------
178+ id | integer | not null default nextval('hint_plan.hints_id_seq'::regclass)
179+ norm_query_string | text | not null
180+ application_name | text | not null
181+ hints | text | not null
181182 Indexes:
182- "hints_pkey" PRIMARY KEY, btree (norm_query_string, application_name)
183+ "hints_pkey" PRIMARY KEY, btree (id)
183184
184185 ----
185186 ---- No. A-6-2 search condition
@@ -192,7 +193,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
192193 (2 rows)
193194
194195 -- No. A-6-2-1
195-INSERT INTO hint_plan.hints VALUES (
196+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
197+ VALUES (
196198 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
197199 '',
198200 'SeqScan(t1)');
@@ -211,7 +213,8 @@ error hint:
211213 (2 rows)
212214
213215 -- No. A-6-2-2
214-INSERT INTO hint_plan.hints VALUES (
216+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
217+ VALUES (
215218 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
216219 'psql',
217220 'BitmapScan(t1)');
@@ -233,7 +236,8 @@ error hint:
233236
234237 TRUNCATE hint_plan.hints;
235238 -- No. A-6-2-3
236-INSERT INTO hint_plan.hints VALUES (
239+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
240+ VALUES (
237241 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
238242 'dummy_application_name',
239243 'SeqScan(t1)'
@@ -247,7 +251,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
247251
248252 TRUNCATE hint_plan.hints;
249253 -- No. A-6-2-4
250-INSERT INTO hint_plan.hints VALUES (
254+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
255+ VALUES (
251256 'EXPLAIN (COSTS false) SELECT * FROM s1.t1;',
252257 '',
253258 'SeqScan(t1)'
@@ -264,7 +269,8 @@ TRUNCATE hint_plan.hints;
264269 ---- No. A-6-3 number of constant
265270 ----
266271 -- No. A-6-3-1
267-INSERT INTO hint_plan.hints VALUES (
272+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
273+ VALUES (
268274 'EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;',
269275 '',
270276 'SeqScan(t1)'
@@ -284,7 +290,8 @@ error hint:
284290
285291 TRUNCATE hint_plan.hints;
286292 -- No. A-6-3-2
287-INSERT INTO hint_plan.hints VALUES (
293+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
294+ VALUES (
288295 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
289296 '',
290297 'SeqScan(t1)'
@@ -305,7 +312,8 @@ error hint:
305312
306313 TRUNCATE hint_plan.hints;
307314 -- No. A-6-3-3
308-INSERT INTO hint_plan.hints VALUES (
315+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
316+ VALUES (
309317 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ? OR t1.c1 = ?;',
310318 '',
311319 'SeqScan(t1)'
@@ -2259,7 +2267,8 @@ SHOW pg_hint_plan.parse_messages;
22592267 ----
22602268 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
22612269 ----
2262-INSERT INTO hint_plan.hints VALUES (
2270+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
2271+ VALUES (
22632272 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
22642273 '',
22652274 'SeqScan(t1)');
--- a/expected/ut-A-9.2.out
+++ b/expected/ut-A-9.2.out
@@ -172,14 +172,15 @@ EXPLAIN (COSTS false) SELECT * /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
172172 SET pg_hint_plan.enable_hint_table TO on;
173173 -- No. A-6-1-1
174174 \d hint_plan.hints
175- Table "hint_plan.hints"
176- Column | Type | Modifiers
177--------------------+------+-----------
178- norm_query_string | text | not null
179- application_name | text | not null
180- hints | text | not null
175+ Table "hint_plan.hints"
176+ Column | Type | Modifiers
177+-------------------+---------+--------------------------------------------------------------
178+ id | integer | not null default nextval('hint_plan.hints_id_seq'::regclass)
179+ norm_query_string | text | not null
180+ application_name | text | not null
181+ hints | text | not null
181182 Indexes:
182- "hints_pkey" PRIMARY KEY, btree (norm_query_string, application_name)
183+ "hints_pkey" PRIMARY KEY, btree (id)
183184
184185 ----
185186 ---- No. A-6-2 search condition
@@ -192,7 +193,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
192193 (2 rows)
193194
194195 -- No. A-6-2-1
195-INSERT INTO hint_plan.hints VALUES (
196+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
197+ VALUES (
196198 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
197199 '',
198200 'SeqScan(t1)');
@@ -211,7 +213,8 @@ error hint:
211213 (2 rows)
212214
213215 -- No. A-6-2-2
214-INSERT INTO hint_plan.hints VALUES (
216+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
217+ VALUES (
215218 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
216219 'psql',
217220 'BitmapScan(t1)');
@@ -231,7 +234,8 @@ error hint:
231234
232235 TRUNCATE hint_plan.hints;
233236 -- No. A-6-2-3
234-INSERT INTO hint_plan.hints VALUES (
237+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
238+ VALUES (
235239 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
236240 'dummy_application_name',
237241 'SeqScan(t1)'
@@ -245,7 +249,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
245249
246250 TRUNCATE hint_plan.hints;
247251 -- No. A-6-2-4
248-INSERT INTO hint_plan.hints VALUES (
252+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
253+ VALUES (
249254 'EXPLAIN (COSTS false) SELECT * FROM s1.t1;',
250255 '',
251256 'SeqScan(t1)'
@@ -262,7 +267,8 @@ TRUNCATE hint_plan.hints;
262267 ---- No. A-6-3 number of constant
263268 ----
264269 -- No. A-6-3-1
265-INSERT INTO hint_plan.hints VALUES (
270+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
271+ VALUES (
266272 'EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;',
267273 '',
268274 'SeqScan(t1)'
@@ -282,7 +288,8 @@ error hint:
282288
283289 TRUNCATE hint_plan.hints;
284290 -- No. A-6-3-2
285-INSERT INTO hint_plan.hints VALUES (
291+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
292+ VALUES (
286293 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
287294 '',
288295 'SeqScan(t1)'
@@ -303,7 +310,8 @@ error hint:
303310
304311 TRUNCATE hint_plan.hints;
305312 -- No. A-6-3-3
306-INSERT INTO hint_plan.hints VALUES (
313+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
314+ VALUES (
307315 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ? OR t1.c1 = ?;',
308316 '',
309317 'SeqScan(t1)'
@@ -2257,7 +2265,8 @@ SHOW pg_hint_plan.parse_messages;
22572265 ----
22582266 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
22592267 ----
2260-INSERT INTO hint_plan.hints VALUES (
2268+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
2269+ VALUES (
22612270 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
22622271 '',
22632272 'SeqScan(t1)');
--- a/sql/pg_hint_plan.sql
+++ b/sql/pg_hint_plan.sql
@@ -823,7 +823,7 @@ EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
823823 EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
824824
825825 -- search from hint table
826-INSERT INTO hint_plan.hints VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
826+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints) VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
827827 SET pg_hint_plan.enable_hint_table = on;
828828 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = 1;
829829 SET pg_hint_plan.enable_hint_table = off;
--- a/sql/ut-A.sql
+++ b/sql/ut-A.sql
@@ -91,14 +91,16 @@ SET pg_hint_plan.enable_hint_table TO on;
9191 ----
9292 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
9393 -- No. A-6-2-1
94-INSERT INTO hint_plan.hints VALUES (
94+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
95+ VALUES (
9596 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
9697 '',
9798 'SeqScan(t1)');
9899 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
99100
100101 -- No. A-6-2-2
101-INSERT INTO hint_plan.hints VALUES (
102+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
103+ VALUES (
102104 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
103105 'psql',
104106 'BitmapScan(t1)');
@@ -106,7 +108,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
106108 TRUNCATE hint_plan.hints;
107109
108110 -- No. A-6-2-3
109-INSERT INTO hint_plan.hints VALUES (
111+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
112+ VALUES (
110113 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
111114 'dummy_application_name',
112115 'SeqScan(t1)'
@@ -115,7 +118,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
115118 TRUNCATE hint_plan.hints;
116119
117120 -- No. A-6-2-4
118-INSERT INTO hint_plan.hints VALUES (
121+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
122+ VALUES (
119123 'EXPLAIN (COSTS false) SELECT * FROM s1.t1;',
120124 '',
121125 'SeqScan(t1)'
@@ -128,7 +132,8 @@ TRUNCATE hint_plan.hints;
128132 ----
129133
130134 -- No. A-6-3-1
131-INSERT INTO hint_plan.hints VALUES (
135+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
136+ VALUES (
132137 'EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;',
133138 '',
134139 'SeqScan(t1)'
@@ -137,7 +142,8 @@ EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;
137142 TRUNCATE hint_plan.hints;
138143
139144 -- No. A-6-3-2
140-INSERT INTO hint_plan.hints VALUES (
145+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
146+ VALUES (
141147 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
142148 '',
143149 'SeqScan(t1)'
@@ -146,7 +152,8 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
146152 TRUNCATE hint_plan.hints;
147153
148154 -- No. A-6-3-3
149-INSERT INTO hint_plan.hints VALUES (
155+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
156+ VALUES (
150157 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ? OR t1.c1 = ?;',
151158 '',
152159 'SeqScan(t1)'
@@ -705,7 +712,8 @@ SHOW pg_hint_plan.parse_messages;
705712 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
706713 ----
707714
708-INSERT INTO hint_plan.hints VALUES (
715+INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
716+ VALUES (
709717 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
710718 '',
711719 'SeqScan(t1)');
Show on old repository browser