Hi,
> I've attached a patch to display individual query in the
> pg_stat_activity query field when multiple SQL statements are
> currently displayed.
>
> Motivation:
>
> When multiple statements are displayed then we don’t know which
> one is currently running.
>
> I'm not sure I'd want that to happen, as it could make it much
> harder to track the activity back to a query in the application
> layer or server logs.
>
> Perhaps a separate field could be added for the current statement,
> or a value to indicate what the current statement number in the
> query is?
As a user, I think this feature is useful to users.
It would be nice that pg_stat_activity also show currently running query
in a user defined function(PL/pgSQL) .
I understood that this patch is not for user defined functions.
Please let me know if it's better to make another thread.
In general, PL/pgSQL functions have multiple queries,
and users want to know the progress of query execution, doesn't it?
--
Masahiro Ikeda
NTT DATA CORPORATION