diff --git a/pg_stat_monitor.c b/pg_stat_monitor.c index ee63ba7..2f51c08 100644 --- a/pg_stat_monitor.c +++ b/pg_stat_monitor.c @@ -1712,6 +1712,11 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo, if (tmp.state == PGSS_FINISHED) continue; } + + /* Skip queries such as, $1, $2 := $3, etc. */ + if (tmp.state == PGSS_PARSE || tmp.state == PGSS_PLAN) + continue; + if (tmp.info.parentid != UINT64CONST(0)) { int len = 0;