Psql
psql is PostgreSQL’s interactive command-line client for connecting to databases and executing SQL statements, administrative commands, and client-specific meta-commands.
Just Use Postgres!
psql is PostgreSQL's lightweight command-line client for connecting to databases and executing SQL and psql meta-commands.
- How it is used
- Operates as an interactive client for connecting to PostgreSQL containers and running SQL or database-inspection commands.
- How deep it goes
- Explains invocation, prompts, socket authentication, SQL, and meta-commands, but stops short of administration or application integration.
- Examples
- Demonstrates docker exec, the postgres=# prompt, \conninfo, \d, \?, and TimescaleDB extension queries.
- What you can do after
- Operate PostgreSQL interactively from a container, inspect connection state and relations, execute SQL, and check installed extensions.
Build Python Web Apps with Streamlit
psql is PostgreSQL's interactive command-line client for issuing SQL statements and database-administration commands.
- How it is used
- Connects to PostgreSQL and provides an interactive place to administer databases and execute SQL for an application.
- How deep it goes
- Covers installation paths, user and database setup, table inspection, and basic SQL operations without deeper PostgreSQL internals.
- Examples
- Uses haikudb, the haiku_lord user, users and haikus tables, and SQL queries against sample haiku records.
- What you can do after
- Operate/configure PostgreSQL locally by connecting to databases, creating tables, running CRUD statements, and checking results.
Read how Build Python Web Apps with Streamlit explains psql →
Road to Kubernetes
psql is the PostgreSQL interactive command-line client for executing SQL statements and administrative commands.
- How it is used
- Uses psql from a temporary Kubernetes Pod to test database connectivity and container-to-container communication.
- How deep it goes
- Demonstrates temporary Pod provisioning, client installation, and database connection, while deferring application integration code.
- Examples
- Uses a debian:bullseye-slim Pod, sleep infinity, kubectl provisioning, and a Docker --rm comparison.
- What you can do after
- Diagnose/debug with it by testing PostgreSQL access and service communication from inside a Kubernetes cluster.
Related concepts
- PostgreSQLuses · PostgreSQL is an open-source object-relational database management system that implements SQL and supports transactional data storage and extensibility.
- Unix socketuses · A Unix socket is an interprocess communication endpoint that enables processes on the same host to exchange data.
- psql meta-commanduses · A psql meta-command is a backslash-prefixed instruction interpreted by the psql command-line client rather than by the SQL server.
- containerpart of · A software container is an isolated execution environment that packages an application and its dependencies while sharing the host operating system kernel.
- SQLuses · SQL is a standardized declarative language for defining, querying, and manipulating data and structures in relational database systems.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


