psql¶
$ psql -p 6432
d¶
Сведения по таблице
postgres=# \d table_name;
Column | Type | Modifiers
-------+---------+----------
id | integer | not null
Indexes:
Foreign-key constraints:
dt¶
Список таблиц в текущей БД
postgres=# \dt
List of relations
Shema | Name | Type | Owner
-------+----------+-------+---------
public | sessions | table | postgres
du¶
Список пользователей в текущей БД
postgres=# \du
List of roles
Role name | Attributes | Member of
----------+--------------+----------
postgres | Superuser, | {}
| Create role, |
| Create DB, |
| Replication, |
| Bypass RLS |
list¶
Список существующих баз
postgres=# \list
List of databases
Name | Owner
----------+----------
postgres | postgres
template0 | postgres
template1 | postgres