SHARE
TWEET

Untitled

a guest Jun 27th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select * from pg_stat_activity
  2.      
  3. CREATE FUNCTION get_sa() RETURNS SETOF pg_stat_activity AS
  4. $$ SELECT * FROM pg_catalog.pg_stat_activity; $$
  5. LANGUAGE sql
  6. VOLATILE
  7. SECURITY DEFINER;
  8.  
  9. CREATE VIEW pg_stat_activity_allusers AS SELECT * FROM get_sa();
  10.  
  11. GRANT SELECT ON pg_stat_activity_allusers TO public;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top