You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using pg_stat_statement you can only look at your own queries, which is expected behaviour, but suboptimal for users who want to inspect queries from multiple bindings.
> SELECT (total_time / 1000 / 60) as total_minutes,
(total_time/calls) as average_time,
query
FROM pg_stat_statements p
total_minutes | average_time | query
---------+---------------+------------------+--------------------------
199.0077556 | 333.073461212308 | <insufficient privilege>
The text was updated successfully, but these errors were encountered:
We could do something like this filthy pseudo-sql when we create the binding
BEGIN
SELECT true FROM pg_extension WHERE extname = 'pg_stat_statement';
IF FOUND THEN
GRANT SELECT ON pg_stat_statements TO $1;
END IF;
END; $$ LANGUAGE plpgsql;
Where $1 is the user for a binding, or do the above based on the binding args.
When using pg_stat_statement you can only look at your own queries, which is expected behaviour, but suboptimal for users who want to inspect queries from multiple bindings.
The text was updated successfully, but these errors were encountered: