Skip to content

Category Archives: PostgreSQL

Bulk Changing PostgreSQL Permissions

25-Oct-10

In a comp.databases.postgresql.general thread from 2004, John Sidney-Woollett details how to change PostgreSQL permissions on tables, views, functions and sequences in bulk – go to the thread for background and further details. In case the thread should become unavailable, queries are replicated below: Tables Views Functions Sequences

PostgreSQL Query Monitoring

15-Feb-09

postgres=# select * from pg_stat_activity; datid | datname | procpid | usesysid | usename | current_query | query_start | backend_start | client_addr | client_port ——-+———-+———+———-+———-+—————+——————————-+——————————-+————-+————- 10793 | postgres | 3443 | 10 | postgres | <IDLE> | 2009-02-15 07:36:14.272725-08 | 2009-02-15 07:36:14.272521-08 | | -1 (1 row) If you do not have stats_command_string set to [...]