Shell (psql+)

psql compatibility

psql+ is a native PostgreSQL shell that is fully psql-compatible. Everything you already know from psql works unchanged — same backslash commands, same behavior, same output. There is nothing new to learn to be productive on day one.

Everything from psql works

If a command works in psql, it works identically in psql+. Your muscle memory, your scripts, and your \i files all carry over without edits.

Most-used backslash commands

CommandWhat it does
\lList all databases on the server
\dtList tables in the current schema(s)
\d <table>Describe a table — columns, types, indexes, constraints
\diList indexes
\dnList schemas (namespaces)
\dfList functions
\c <db> [role]Connect to another database, optionally as another role
\timingToggle query execution timing on/off
\xToggle expanded (one-column-per-row) output
\eOpen the current query buffer in your $EDITOR
\i <file>Run SQL from a file
\copyStream data between a table and a local file (client-side)
\conninfoShow the current connection's host, port, database, and user
\?List all backslash commands with descriptions

These are the commands you reach for most often, but the list is not exhaustive — every other psql backslash command (\du, \dp, \sf, \g, \watch, \set, and the rest) behaves exactly as it does upstream.

What psql+ adds on top

psql+ keeps the full psql command surface and layers two extra commands onto it:

  • \h — readable help. Standard \h prints raw SQL grammar. In psql+, \h reformats it into clean syntax, plain-language option descriptions, and a copy-pasteable example.
\h create index
  • ?? — inline AI. Ask a question in plain English on its own line, and the assistant answers using your last query and surrounding schema for context.
?? why is this query not using my index

Both additions are strictly additive. They never change how an existing backslash command behaves, never run statements on their own, and never mutate your data. \h and ?? are extra tools sitting beside the psql commands you already trust — use them when you want them, ignore them when you don't.