LOAD 'pg_hint_plan'; SET pg_hint_plan.enable_hint TO on; SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; SET search_path TO public; ---- ---- No. G-1-1 RULE definition table ---- -- No. G-1-1-1 EXPLAIN (COSTS false) UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; QUERY PLAN ----------------------------------------------------------------- Aggregate -> Nested Loop Join Filter: (t1.c1 = t4.c1) -> Nested Loop Join Filter: (t1.c1 = t3.c1) -> Nested Loop Join Filter: (t1.c1 = t2.c1) -> Nested Loop -> Tid Scan on r1 TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 TID Cond: (ctid = '(1,1)'::tid) (19 rows) /*+ Set(enable_tidscan off)Set(enable_nestloop off) */ EXPLAIN (COSTS false) UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: QUERY PLAN --------------------------------------------------------------------- Aggregate -> Nested Loop -> Hash Join Hash Cond: (t1.c1 = t4.c1) -> Hash Join Hash Cond: (t1.c1 = t2.c1) -> Hash Join Hash Cond: (t3.c1 = t1.c1) -> Seq Scan on t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r1 Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) (21 rows) EXPLAIN (COSTS false) UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; QUERY PLAN ----------------------------------------------------------------- Aggregate -> Nested Loop Join Filter: (b1t1.c1 = b1t4.c1) -> Nested Loop Join Filter: (b1t1.c1 = b1t3.c1) -> Nested Loop Join Filter: (b1t1.c1 = b1t2.c1) -> Nested Loop -> Tid Scan on r1_ TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 b1t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 b1t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 b1t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 b1t4 TID Cond: (ctid = '(1,1)'::tid) (19 rows) /*+ Set(enable_tidscan off)Set(enable_nestloop off) */ EXPLAIN (COSTS false) UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: QUERY PLAN --------------------------------------------------------------------- Aggregate -> Nested Loop -> Hash Join Hash Cond: (b1t1.c1 = b1t4.c1) -> Hash Join Hash Cond: (b1t1.c1 = b1t2.c1) -> Hash Join Hash Cond: (b1t3.c1 = b1t1.c1) -> Seq Scan on t3 b1t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 b1t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 b1t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 b1t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r1_ Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) (21 rows) -- No. G-1-1-2 EXPLAIN (COSTS false) UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; QUERY PLAN ----------------------------------------------------------------- Aggregate -> Nested Loop Join Filter: (t1.c1 = t4.c1) -> Nested Loop Join Filter: (t1.c1 = t3.c1) -> Nested Loop Join Filter: (t1.c1 = t2.c1) -> Nested Loop -> Tid Scan on r2 TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 TID Cond: (ctid = '(1,1)'::tid) Aggregate -> Nested Loop Join Filter: (t1.c1 = t4.c1) -> Nested Loop Join Filter: (t1.c1 = t3.c1) -> Nested Loop Join Filter: (t1.c1 = t2.c1) -> Nested Loop -> Tid Scan on r2 TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 TID Cond: (ctid = '(1,1)'::tid) (39 rows) /*+ Set(enable_tidscan off)Set(enable_nestloop off) */ EXPLAIN (COSTS false) UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: QUERY PLAN --------------------------------------------------------------------- Aggregate -> Nested Loop -> Hash Join Hash Cond: (t1.c1 = t4.c1) -> Hash Join Hash Cond: (t1.c1 = t2.c1) -> Hash Join Hash Cond: (t3.c1 = t1.c1) -> Seq Scan on t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r2 Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) Aggregate -> Nested Loop -> Hash Join Hash Cond: (t1.c1 = t4.c1) -> Hash Join Hash Cond: (t1.c1 = t2.c1) -> Hash Join Hash Cond: (t3.c1 = t1.c1) -> Seq Scan on t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r2 Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) (43 rows) EXPLAIN (COSTS false) UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; QUERY PLAN ----------------------------------------------------------------- Aggregate -> Nested Loop Join Filter: (b1t1.c1 = b1t4.c1) -> Nested Loop Join Filter: (b1t1.c1 = b1t3.c1) -> Nested Loop Join Filter: (b1t1.c1 = b1t2.c1) -> Nested Loop -> Tid Scan on r2_ TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 b1t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 b1t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 b1t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 b1t4 TID Cond: (ctid = '(1,1)'::tid) Aggregate -> Nested Loop Join Filter: (b2t1.c1 = b2t4.c1) -> Nested Loop Join Filter: (b2t1.c1 = b2t3.c1) -> Nested Loop Join Filter: (b2t1.c1 = b2t2.c1) -> Nested Loop -> Tid Scan on r2_ TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 b2t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 b2t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 b2t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 b2t4 TID Cond: (ctid = '(1,1)'::tid) (39 rows) /*+ Set(enable_tidscan off)Set(enable_nestloop off) */ EXPLAIN (COSTS false) UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: QUERY PLAN --------------------------------------------------------------------- Aggregate -> Nested Loop -> Hash Join Hash Cond: (b1t1.c1 = b1t4.c1) -> Hash Join Hash Cond: (b1t1.c1 = b1t2.c1) -> Hash Join Hash Cond: (b1t3.c1 = b1t1.c1) -> Seq Scan on t3 b1t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 b1t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 b1t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 b1t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r2_ Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) Aggregate -> Nested Loop -> Hash Join Hash Cond: (b2t1.c1 = b2t4.c1) -> Hash Join Hash Cond: (b2t1.c1 = b2t2.c1) -> Hash Join Hash Cond: (b2t3.c1 = b2t1.c1) -> Seq Scan on t3 b2t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 b2t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 b2t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 b2t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r2_ Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) (43 rows) -- No. G-1-1-3 EXPLAIN (COSTS false) UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; QUERY PLAN ----------------------------------------------------------------- Aggregate -> Nested Loop Join Filter: (t1.c1 = t4.c1) -> Nested Loop Join Filter: (t1.c1 = t3.c1) -> Nested Loop Join Filter: (t1.c1 = t2.c1) -> Nested Loop -> Tid Scan on r3 TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 TID Cond: (ctid = '(1,1)'::tid) Aggregate -> Nested Loop Join Filter: (t1.c1 = t4.c1) -> Nested Loop Join Filter: (t1.c1 = t3.c1) -> Nested Loop Join Filter: (t1.c1 = t2.c1) -> Nested Loop -> Tid Scan on r3 TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 TID Cond: (ctid = '(1,1)'::tid) Aggregate -> Nested Loop Join Filter: (t1.c1 = t4.c1) -> Nested Loop Join Filter: (t1.c1 = t3.c1) -> Nested Loop Join Filter: (t1.c1 = t2.c1) -> Nested Loop -> Tid Scan on r3 TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 TID Cond: (ctid = '(1,1)'::tid) (59 rows) /*+ Set(enable_tidscan off)Set(enable_nestloop off) */ EXPLAIN (COSTS false) UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: QUERY PLAN --------------------------------------------------------------------- Aggregate -> Nested Loop -> Hash Join Hash Cond: (t1.c1 = t4.c1) -> Hash Join Hash Cond: (t1.c1 = t2.c1) -> Hash Join Hash Cond: (t3.c1 = t1.c1) -> Seq Scan on t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r3 Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) Aggregate -> Nested Loop -> Hash Join Hash Cond: (t1.c1 = t4.c1) -> Hash Join Hash Cond: (t1.c1 = t2.c1) -> Hash Join Hash Cond: (t3.c1 = t1.c1) -> Seq Scan on t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r3 Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) Aggregate -> Nested Loop -> Hash Join Hash Cond: (t1.c1 = t4.c1) -> Hash Join Hash Cond: (t1.c1 = t2.c1) -> Hash Join Hash Cond: (t3.c1 = t1.c1) -> Seq Scan on t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r3 Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) (65 rows) EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; QUERY PLAN ----------------------------------------------------------------- Aggregate -> Nested Loop Join Filter: (b1t1.c1 = b1t4.c1) -> Nested Loop Join Filter: (b1t1.c1 = b1t3.c1) -> Nested Loop Join Filter: (b1t1.c1 = b1t2.c1) -> Nested Loop -> Tid Scan on r3_ TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 b1t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 b1t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 b1t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 b1t4 TID Cond: (ctid = '(1,1)'::tid) Aggregate -> Nested Loop Join Filter: (b2t1.c1 = b2t4.c1) -> Nested Loop Join Filter: (b2t1.c1 = b2t3.c1) -> Nested Loop Join Filter: (b2t1.c1 = b2t2.c1) -> Nested Loop -> Tid Scan on r3_ TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 b2t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 b2t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 b2t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 b2t4 TID Cond: (ctid = '(1,1)'::tid) Aggregate -> Nested Loop Join Filter: (b3t1.c1 = b3t4.c1) -> Nested Loop Join Filter: (b3t1.c1 = b3t3.c1) -> Nested Loop Join Filter: (b3t1.c1 = b3t2.c1) -> Nested Loop -> Tid Scan on r3_ TID Cond: (ctid = '(1,1)'::tid) Filter: (c1 = 1) -> Tid Scan on t1 b3t1 TID Cond: (ctid = '(1,1)'::tid) -> Seq Scan on t2 b3t2 Filter: (ctid = '(1,1)'::tid) -> Tid Scan on t3 b3t3 TID Cond: (ctid = '(1,1)'::tid) -> Tid Scan on t4 b3t4 TID Cond: (ctid = '(1,1)'::tid) (59 rows) /*+ Set(enable_tidscan off)Set(enable_nestloop off) */ EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)'; LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: LOG: pg_hint_plan: used hint: Set(enable_nestloop off) Set(enable_tidscan off) not used hint: duplication hint: error hint: QUERY PLAN --------------------------------------------------------------------- Aggregate -> Nested Loop -> Hash Join Hash Cond: (b1t1.c1 = b1t4.c1) -> Hash Join Hash Cond: (b1t1.c1 = b1t2.c1) -> Hash Join Hash Cond: (b1t3.c1 = b1t1.c1) -> Seq Scan on t3 b1t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 b1t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 b1t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 b1t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r3_ Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) Aggregate -> Nested Loop -> Hash Join Hash Cond: (b2t1.c1 = b2t4.c1) -> Hash Join Hash Cond: (b2t1.c1 = b2t2.c1) -> Hash Join Hash Cond: (b2t3.c1 = b2t1.c1) -> Seq Scan on t3 b2t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 b2t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 b2t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 b2t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r3_ Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) Aggregate -> Nested Loop -> Hash Join Hash Cond: (b3t1.c1 = b3t4.c1) -> Hash Join Hash Cond: (b3t1.c1 = b3t2.c1) -> Hash Join Hash Cond: (b3t3.c1 = b3t1.c1) -> Seq Scan on t3 b3t3 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t1 b3t1 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t2 b3t2 Filter: (ctid = '(1,1)'::tid) -> Hash -> Seq Scan on t4 b3t4 Filter: (ctid = '(1,1)'::tid) -> Seq Scan on r3_ Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1)) (65 rows) RESET client_min_messages; ---- ---- No. G-2-1 GUC parameter ---- -- No. G-2-1-3 /*+Set(1234567890123456789012345678901234567890123456789012345678901234 1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123" INFO: unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123" c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) -- No. G-2-1-4 /*+Set(constraint_exclusion 1234567890123456789012345678901234567890123456789012345678901234)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; INFO: invalid value for parameter "constraint_exclusion": "1234567890123456789012345678901234567890123456789012345678901234" HINT: Available values: partition, on, off. c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) ---- ---- No. G-2-2 category of GUC parameter and role ---- -- No. G-2-2-1 SET ROLE super_user; /*+Set(block_size 16384)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; INFO: parameter "block_size" cannot be changed c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) -- No. G-2-2-2 /*+Set(archive_mode off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; INFO: parameter "archive_mode" cannot be changed without restarting the server c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) -- No. G-2-2-3 /*+Set(archive_timeout 0)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; INFO: parameter "archive_timeout" cannot be changed now c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) -- No. G-2-2-4 /*+Set(log_connections off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; INFO: parameter "log_connections" cannot be set after connection start c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) -- No. G-2-2-5 /*+Set(log_min_messages WARNING)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) RESET ROLE; -- No. G-2-2-6 GRANT ALL ON SCHEMA s1 TO PUBLIC; GRANT SELECT ON ALL TABLES IN SCHEMA s1 TO normal_user; SET ROLE normal_user; /*+Set(log_min_messages WARNING)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; INFO: permission denied to set parameter "log_min_messages" c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) -- No. G-2-2-7 /*+Set(enable_seqscan on)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; c1 | c2 | c3 | c4 ----+----+----+---- 1 | 1 | 1 | 1 (1 row) RESET ROLE; REVOKE SELECT ON ALL TABLES IN SCHEMA s1 FROM normal_user; REVOKE ALL ON SCHEMA s1 FROM PUBLIC; ---- ---- No. G-2-3 conflict set hint ---- SET client_min_messages TO LOG; -- No. G-2-3-1 /*+Set(enable_indexscan on)Set(enable_indexscan off)*/ SELECT * FROM s1.t1 WHERE false; INFO: pg_hint_plan: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan off)" DETAIL: Conflict set hint. LOG: pg_hint_plan: used hint: Set(enable_indexscan off) not used hint: duplication hint: Set(enable_indexscan on) error hint: c1 | c2 | c3 | c4 ----+----+----+---- (0 rows) -- No. G-2-3-2 /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)*/ SELECT * FROM s1.t1 WHERE false; INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)" DETAIL: Conflict set hint. INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)" DETAIL: Conflict set hint. LOG: pg_hint_plan: used hint: Set(client_min_messages DEBUG2) not used hint: duplication hint: Set(client_min_messages DEBUG5) Set(client_min_messages WARNING) error hint: c1 | c2 | c3 | c4 ----+----+----+---- (0 rows) -- No. G-2-3-3 /*+Set(enable_indexscan on)Set(enable_indexscan o)*/ SELECT * FROM s1.t1 WHERE false; INFO: pg_hint_plan: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan o)" DETAIL: Conflict set hint. INFO: parameter "enable_indexscan" requires a Boolean value LOG: pg_hint_plan: used hint: not used hint: duplication hint: Set(enable_indexscan on) error hint: Set(enable_indexscan o) c1 | c2 | c3 | c4 ----+----+----+---- (0 rows) -- No. G-2-3-4 /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)*/ SELECT * FROM s1.t1 WHERE false; INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)" DETAIL: Conflict set hint. INFO: pg_hint_plan: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBU)" DETAIL: Conflict set hint. INFO: invalid value for parameter "client_min_messages": "DEBU" HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error. LOG: pg_hint_plan: used hint: not used hint: duplication hint: Set(client_min_messages DEBUG5) Set(client_min_messages WARNING) error hint: Set(client_min_messages DEBU) c1 | c2 | c3 | c4 ----+----+----+---- (0 rows) ---- ---- No. G-2-4 debug message ---- -- No. G-2-4-1 /*+SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) */ SELECT * FROM s1.t1 a, s1.t2 b WHERE false; INFO: pg_hint_plan: hint syntax error at or near " " DETAIL: NestLoop hint requires at least two relations. INFO: pg_hint_plan: hint syntax error at or near "SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) " DETAIL: Conflict scan method hint. LOG: pg_hint_plan: used hint: IndexScan(a) not used hint: SeqScan(c) duplication hint: SeqScan(a) error hint: NestLoop(a) c1 | c2 | c3 | c4 | c1 | c2 | c3 | c4 ----+----+----+----+----+----+----+---- (0 rows)