Shell (psql+)

Connecting

psql+ is the native PostgreSQL shell included with your Rillence subscription. It behaves exactly like psql — every backslash command you know still works — and connects to your own PostgreSQL databases, whether they run locally, in a managed cloud, or behind a bastion. It can also connect to a pgpg incident-simulator sandbox using the connection string pgpg hands you.

Connect with a connection string

Pass a standard PostgreSQL URL as the first argument:

psql+ "postgres://user:pass@host:5432/db"

Quote the string so your shell does not split on ? or & in query parameters (for example ?sslmode=require).

Connect with libpq environment variables

If you already export the standard libpq variables, run psql+ with no arguments and it will read them:

export PGHOST=db.internal
export PGPORT=5432
export PGUSER=app
export PGDATABASE=orders
psql+

Explicit connection-string values always override the environment.

Switch databases

Once connected, move between databases on the same server without leaving the shell:

\c analytics
\c orders app_readonly

The second form switches both database and role.

Read the prompt before you run anything

The prompt always shows the connected database and the current search_path:

orders (search_path: app, public) =>

This is deliberate. The most expensive mistakes happen when you think you are on staging and you are on prod, or when a search_path quietly points DDL at the wrong schema. Glance at the prompt before every migration or destructive statement:

orders_staging (search_path: migrations, public) =#

A trailing =# means you are connected as a superuser — extra reason to confirm the database name first.