-> Seq Scan on t2
(9 rows)
+----
+---- No. L-3-5 hint state output
+----
+-- No. L-3-5-1
+/*+Leading()*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+INFO: hint syntax error at or near "Leading()"
+DETAIL: In Leading hint, specified relation name 2 or more.
+LOG: pg_hint_plan:
+used hint:
+not used hint:
+duplication hint:
+error hint:
+Leading()
+
+ QUERY PLAN
+------------------------------------------
+ Merge Join
+ Merge Cond: (t1.c1 = t2.c1)
+ -> Merge Join
+ Merge Cond: (t1.c1 = t3.c1)
+ -> Index Scan using t1_i1 on t1
+ -> Index Scan using t3_i1 on t3
+ -> Sort
+ Sort Key: t2.c1
+ -> Seq Scan on t2
+(9 rows)
+
+-- No. L-3-5-2
+/*+Leading(t1)*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+INFO: hint syntax error at or near "Leading(t1)"
+DETAIL: In Leading hint, specified relation name 2 or more.
+LOG: pg_hint_plan:
+used hint:
+not used hint:
+duplication hint:
+error hint:
+Leading(t1)
+
+ QUERY PLAN
+------------------------------------------
+ Merge Join
+ Merge Cond: (t1.c1 = t2.c1)
+ -> Merge Join
+ Merge Cond: (t1.c1 = t3.c1)
+ -> Index Scan using t1_i1 on t1
+ -> Index Scan using t3_i1 on t3
+ -> Sort
+ Sort Key: t2.c1
+ -> Seq Scan on t2
+(9 rows)
+
+-- No. L-3-5-3
+/*+Leading(t1 t2)*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+LOG: pg_hint_plan:
+used hint:
+Leading(t1 t2)
+not used hint:
+duplication hint:
+error hint:
+
+ QUERY PLAN
+------------------------------------------
+ Nested Loop
+ -> Merge Join
+ Merge Cond: (t1.c1 = t2.c1)
+ -> Index Scan using t1_i1 on t1
+ -> Sort
+ Sort Key: t2.c1
+ -> Seq Scan on t2
+ -> Index Scan using t3_i1 on t3
+ Index Cond: (c1 = t1.c1)
+(9 rows)
+
+-- No. L-3-5-4
+/*+Leading(t1 t2 t3)*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+LOG: pg_hint_plan:
+used hint:
+Leading(t1 t2 t3)
+not used hint:
+duplication hint:
+error hint:
+
+ QUERY PLAN
+------------------------------------------------
+ Hash Join
+ Hash Cond: (t3.c1 = t1.c1)
+ -> Seq Scan on t3
+ -> Hash
+ -> Merge Join
+ Merge Cond: (t1.c1 = t2.c1)
+ -> Index Scan using t1_i1 on t1
+ -> Sort
+ Sort Key: t2.c1
+ -> Seq Scan on t2
+(10 rows)
+
JOIN s1.t2 ON (t1.c1 = t2.c1)
JOIN s1.t3 ON (t1.c1 = t3.c1);
+----
+---- No. L-3-5 hint state output
+----
+
+-- No. L-3-5-1
+/*+Leading()*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+
+-- No. L-3-5-2
+/*+Leading(t1)*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+
+-- No. L-3-5-3
+/*+Leading(t1 t2)*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+
+-- No. L-3-5-4
+/*+Leading(t1 t2 t3)*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1
+ JOIN s1.t2 ON (t1.c1 = t2.c1)
+ JOIN s1.t3 ON (t1.c1 = t3.c1);
+