OSDN Git Service

Bug fix:EXECUTEコマンド中にエラー終了したあとにSELECTを実行すると
[pghintplan/pg_hint_plan.git] / expected / prepare-9.1.out
index 66fb6ab..08e095d 100644 (file)
@@ -653,3 +653,21 @@ EXPLAIN (COSTS false) EXECUTE p7 (10);
 /*+ NestLoop(t1 t2) */
 EXPLAIN (COSTS false) EXECUTE p8 (10);
 ERROR:  prepared statement "p8" does not exist
+/*+ NestLoop(t1 t2) */
+EXPLAIN (COSTS false) SELECT count(*) FROM t1, t2 WHERE t1.id = t2.id AND t1.id > 10;
+LOG:  pg_hint_plan:
+used hint:
+NestLoop(t1 t2)
+not used hint:
+duplication hint:
+error hint:
+
+                       QUERY PLAN                       
+--------------------------------------------------------
+ Aggregate
+   ->  Nested Loop
+         ->  Seq Scan on t2
+         ->  Index Scan using t1_pkey on t1
+               Index Cond: ((id > 10) AND (id = t2.id))
+(5 rows)
+