OSDN Git Service

Support DECLARE CURSOR syntax and added regression for table hinting.
[pghintplan/pg_hint_plan.git] / output / ut-fdw.source
index ec15e31..4907980 100644 (file)
@@ -112,3 +112,33 @@ error hint:
    ->  Index Scan using t1_i1 on t1
          Index Cond: (c1 = ft_1.id)
 
+----
+---- No. R-1-6 object type for the hint
+----
+-- No. R-1-6-6
+\o results/ut-fdw.tmpout
+/*+Rows(ft_1 ft_2 #1)Leading(ft_1 ft_2 t1)*/
+EXPLAIN SELECT * FROM s1.t1, ft1 ft_1, ft1 ft_2 WHERE t1.c1 = ft_1.id AND t1.c1 = ft_2.id;
+LOG:  pg_hint_plan:
+used hint:
+Leading(ft_1 ft_2 t1)
+Rows(ft_1 ft_2 #1)
+not used hint:
+duplication hint:
+error hint:
+
+\o
+\! sql/maskout.sh results/ut-fdw.tmpout
+ Nested Loop  (cost=xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         Join Filter: (ft_1.id = ft_2.id)
+         ->  Foreign Scan on ft1 ft_1  (cost=xxx rows=1 width=xxx)
+               Foreign File: @abs_srcdir@/data/data.csv
+               Foreign File Size: 42
+         ->  Foreign Scan on ft1 ft_2  (cost=xxx rows=1 width=xxx)
+               Foreign File: @abs_srcdir@/data/data.csv
+               Foreign File Size: 42
+   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+         Index Cond: (c1 = ft_1.id)
+
+\! rm results/ut-fdw.tmpout