---- No. A-5-2 hint position
----
-- No. A-5-2-1
+EXPLAIN (COSTS false) SELECT c1 FROM s1.t1 WHERE t1.c1 = 1;
+ QUERY PLAN
+------------------------------
+ Index Scan using t1_i1 on t1
+ Index Cond: (c1 = 1)
+(2 rows)
+
/*+SeqScan(t1)*/
-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
+EXPLAIN (COSTS false) SELECT c1 FROM s1.t1 WHERE t1.c1 = 1;
LOG: pg_hint_plan:
used hint:
SeqScan(t1)
(2 rows)
-- No. A-5-2-2
-/* normal comment */
-/*+SeqScan(t1)*/
-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
+EXPLAIN (COSTS false) SELECT c1, c2 AS c_2 /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
+LOG: pg_hint_plan:
+used hint:
+SeqScan(t1)
+not used hint:
+duplication hint:
+error hint:
+
+ QUERY PLAN
+--------------------
+ Seq Scan on t1
+ Filter: (c1 = 1)
+(2 rows)
+
+-- No. A-5-2-3
+EXPLAIN (COSTS false) SELECT c1 AS "c1"/*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
QUERY PLAN
------------------------------
Index Scan using t1_i1 on t1
Index Cond: (c1 = 1)
(2 rows)
--- No. A-5-2-3
-EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
+-- No. A-5-2-4
+EXPLAIN (COSTS false) SELECT * /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
QUERY PLAN
------------------------------
Index Scan using t1_i1 on t1
Index Cond: (c1 = 1)
(2 rows)
--- No. A-5-2-4
----
---- No. A-6-1 hint's table definition