Tom Lane wrote:
> Kevin Brown <kevin@sysexperts.com> writes:
[...]
> > It would also be handy if users could see their own queries while the
> > rest remain blank. That would require changing
> > pg_stat_get_backend_activity() so that it returns a value if the user
> > is the superuser or if the user asking for the answer is the same as
> > the user who owns the backend entry being looked up. Are there any
> > pitfalls to implementing that?
>
> Seems reasonable offhand ...
Here's the patch to make this happen. The first is against 7.2.4, the
second is against CVS tip.
If I got it wrong and need to use something other than GetUserId(),
please let me know.
--
Kevin Brown kevin@sysexperts.com