/*+ 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)
+
/*+ 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)
+
stmt_name = stmt->name;
}
+ if (stmt_name)
+ {
+ PG_TRY();
+ {
+ if (prev_ProcessUtility)
+ (*prev_ProcessUtility) (parsetree, queryString, params,
+ isTopLevel, dest, completionTag);
+ else
+ standard_ProcessUtility(parsetree, queryString, params,
+ isTopLevel, dest, completionTag);
+ }
+ PG_CATCH();
+ {
+ stmt_name = NULL;
+ PG_RE_THROW();
+ }
+ PG_END_TRY();
+
+ stmt_name = NULL;
+
+ return;
+ }
+
if (prev_ProcessUtility)
(*prev_ProcessUtility) (parsetree, queryString, params,
isTopLevel, dest, completionTag);
else
standard_ProcessUtility(parsetree, queryString, params,
isTopLevel, dest, completionTag);
-
- if (stmt_name)
- {
- stmt_name = NULL;
- }
}
static PlannedStmt *