Pingu
Computer MySQL PostgreSQL Books Publications
Spielereien Kanu Business TopoDB POI Klettersteigen History TransPool Thermal Baden Brokenstuben Goldwaschen
Blog Contact
Shinguz
Google
/ch/open

PostgreSQL Spickliste

Create a superuser (admin)

SQL> \du
                                   List of roles
 Role name |                         Attributes                         | Member of
-----------+------------------------------------------------------------+-----------
 postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

SQL> CREATE USER oli WITH SUPERUSER PASSWORD '';

SQL> ALTER USER test_user WITH SUPERUSER;

SQL> SELECT * FROM pg_user WHERE usename = 'oli';

psql --username=oli postgres

work_mem

postgres=# SELECT name, setting, unit, category FROM pg_settings WHERE category LIKE 'Resource Usage / Mem%' AND NAME like 'work%';
   name   | setting | unit |        category
----------+---------+------+-------------------------
 work_mem | 4096    | kB   | Resource Usage / Memory
(1 row)
 show work_mem;
 work_mem
----------
 4MB
(1 row)