Files
learning/Software Notes/linux/postgres_commands.txt
T
oleg20111511 f235a35ebb Reorganize
2026-03-02 19:15:17 +02: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;