Postgres

Manage PostgreSQL databases via the psql CLI.

olasunkanmi-se b0661f5 2 files · 2.5 KB Updated

File contents

psql

Use psql to interact with PostgreSQL databases.

Common Commands

Connection

  • Connect: psql "postgresql://user:password@host:port/dbname"

Operations

  • List databases: \l
  • List tables: \dt
  • Describe table: \d <table_name>
  • Execute query: SELECT * FROM table LIMIT 10;
  • Quit: \q

Notes

  • Requires psql to be installed in the environment.

olasunkanmi-se/codebuddy/tree/main/skills/postgres commit b0661f5964

Frequently asked questions

npx skillmds@latest add olasunkanmi-se/postgres