Postgres Flashcards
1
Q
access postgres
A
sudo su postgres -c psql
2
Q
delete role
A
drop role user;
3
Q
login
A
psql -d table -U user
4
Q
create superuser with login privelages role basic
A
CREATE ROLE SUPERUSER LOGIN;
5
Q
set password for role
A
alter role jwhorto1 with encrypted password ‘x’;
6
Q
give existing role createdb ability
A
alter role jwhorto1 with createdb;
7
Q
list all roles and role attributes and groups theyre part of
A
\du
8
Q
list all dbs
A
\list
9
Q
list all tables in current db
A
\dt