Docker
Чтобы подключиться к postgresql контейнеру
# Connect to container
docker exec -it <container_id> bash
# Connect to PostgreSQL
psql -U <user> -d <database>
\dt # Show tables
SELECT * FROM <table>; # Show table content
Apr 22, 20251 min read
Чтобы подключиться к postgresql контейнеру
# Connect to container
docker exec -it <container_id> bash
# Connect to PostgreSQL
psql -U <user> -d <database>
\dt # Show tables
SELECT * FROM <table>; # Show table content