# Postgres

> Manage PostgreSQL databases via the psql CLI.

- Skill: `olasunkanmi-se/postgres` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add olasunkanmi-se/postgres`
- Raw SKILL.md: https://api.skillmd.com/api/skills/olasunkanmi-se/postgres/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: olasunkanmi-se (https://skillmd.com/u/olasunkanmi-se)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/olasunkanmi-se/postgres

---


# 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.

