The prompt & session
psql+ starts the way psql does, but the prompt carries two pieces of context you should never have to guess at: the database you are connected to and the current search_path.
orders (search_path: app, public) =>
This is not decoration. It is the cheapest insurance you have against running the right command against the wrong place.
Why the prompt shows this
Most production mistakes are not exotic. They are a correct statement pointed at the wrong target:
- Running a staging migration against the prod database because the terminal tab was reused.
- Issuing
DROP TABLEorALTER TABLEwhilesearch_pathsilently resolved topublicinstead of your intendedappschema. - Creating an index in the wrong schema and wondering why the planner never uses it.
By keeping the database name and search_path in front of you on every line, psql+ lets you catch a wrong target before you press Enter on DDL — not after.
Reading the prompt
The trailing characters follow psql convention:
orders (search_path: app, public) => -- ordinary user
orders (search_path: app, public) =# -- superuser
A trailing =# means you are connected as a superuser. Treat that prompt as a standing reminder that nothing is protecting you from yourself.
When you start a multi-line statement, the prompt continues with -> just as in stock psql:
orders (search_path: app, public) => SELECT id
orders (search_path: app, public) -> FROM users
orders (search_path: app, public) -> WHERE active;
Switching database and role
Use the standard \c (\connect) meta-command. The prompt updates immediately to reflect the new connection, so you always see where you landed:
orders (search_path: app, public) => \c analytics
You are now connected to database "analytics".
analytics (search_path: public) =>
You can switch both database and role in one step:
analytics (search_path: public) => \c reporting readonly_user
You are now connected to database "reporting" as user "readonly_user".
reporting (search_path: public) =>
If you change search_path mid-session, the prompt tracks it too:
SET search_path TO billing, public;
reporting (search_path: billing, public) =>
Because psql+ is fully psql-compatible, every backslash command, .psqlrc setting, and connection option you already use continues to work — you simply get a prompt that tells you the truth about where you are.