Files
learning/linux/postgres_commands.txt
2022-05-06 00:50:43 +03:00

18 lines
247 B
Plaintext
Executable File

Start:
su postgres
psql
Show databases:
\l
Switch to database:
\c [name]
Show tables
\dt
Create new database and user:
create database mydb;
create user myuser with encrypted password 'mypass';
grant all privileges on database mydb to myuser;