Postgres Flashcards

1
Q

access postgres

A

sudo su postgres -c psql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

delete role

A

drop role user;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

login

A

psql -d table -U user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

create superuser with login privelages role basic

A

CREATE ROLE SUPERUSER LOGIN;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

set password for role

A

alter role jwhorto1 with encrypted password ‘x’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

give existing role createdb ability

A

alter role jwhorto1 with createdb;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

list all roles and role attributes and groups theyre part of

A

\du

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

list all dbs

A

\list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

list all tables in current db

A

\dt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly