SELECTCURRENT_USER;
SELECT*FROM information_schema.role_table_grants WHERE grantee='myexampleuser';
set password for a user
ALTERUSER theusername WITH ENCRYPTED PASSWORD 'thepassword';
shortcuts
---- list all databases
\l
---- ...with more details
\l+---- list users
\du
---- connect to database
\c my_db_name
---- list tables of connected database
\dt
---- ...with more details
\d+---- list columns of a table
\d+ my_table_name
---- list extensions
\dx
---- list current connectionsSELECT*FROM pg_stat_activity;
---- show version informationSELECT version();
Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
commands-postgresql.txt · Zuletzt geändert: 2019/11/08 13:49 von alex