liveBook · Manning

Psql

psql is PostgreSQL’s interactive command-line client for connecting to databases and executing SQL statements, administrative commands, and client-specific meta-commands.

How 3 Manning books explain it

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.

Read how Just Use Postgres! explains psql →

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.

Read how Road to Kubernetes explains psql →

Related concepts

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.