This file contains hidden or 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
| select * from | |
| (select count(*) used from pg_stat_activity) q1, | |
| (select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) q2, | |
| (select setting::int max_conn from pg_settings where name=$$max_connections$$) q3; |
This file contains hidden or 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 a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing schemas & tables, and to future tables (as of now you can't grant access to future schemas) | |
| DO | |
| $do$ | |
| DECLARE | |
| sch text; | |
| BEGIN | |
| FOR sch IN |