Re: Proposal - Allow extensions to set a Plan Identifier
От | Alena Rybakina |
---|---|
Тема | Re: Proposal - Allow extensions to set a Plan Identifier |
Дата | |
Msg-id | f5acedd6-9624-43d6-8a3e-242637ebbfaf@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: Proposal - Allow extensions to set a Plan Identifier (Sami Imseih <samimseih@gmail.com>) |
Ответы |
Re: Proposal - Allow extensions to set a Plan Identifier
|
Список | pgsql-hackers |
Hi! I started reviewing it and noticed that your code repeated this cycle maybe it would be better to put it in a separate function, for example in the form of a name like "analyze_stmts"? or is it possible to create a macro for them? @@ -2016,6 +2017,17 @@ exec_bind_message(StringInfo input_message) */ cplan = GetCachedPlan(psrc, params, NULL, NULL); + foreach(lc, cplan->stmt_list) + { + PlannedStmt *plan = lfirst_node(PlannedStmt, lc); + + if (plan->planId != UINT64CONST(0)) + { + pgstat_report_plan_id(plan->planId, false); + break; + } + } + /* * Now we can define the portal. * @@ -2170,6 +2182,17 @@ exec_execute_message(const char *portal_name, long max_rows) } } + foreach(lc, portal->stmts) + { + PlannedStmt *stmt = lfirst_node(PlannedStmt, lc); + + if (stmt->planId != UINT64CONST(0)) + { + pgstat_report_plan_id(stmt->planId, false); + break; + } + } + cmdtagname = GetCommandTagNameAndLen(portal->commandTag, &cmdtaglen); -- Regards, Alena Rybakina Postgres Professional
В списке pgsql-hackers по дате отправления: