Created
January 12, 2017 08:38
-
-
Save kmoppel/db99b0dfbd5ff05384ba09c7777f1b2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function all_queries(out q_pid int, out q_usename text, out q_query text) returns setof record as | |
$$ | |
select pid, usename::text, query from pg_stat_activity | |
$$ language sql security definer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment