Simple completions such as keywords and sql-functions.
Table name completions after the 'FROM' keyword.
Column name completions once a table is recognized.
Column completions will work even when table names are aliased.
Syntax highlighting for sql.
Limited support for some of psql's powerful back-slash commands.
F3 key will toggle multi-line support.In multi-line mode you can break your sql statement into multiple lines. A semi-colon is needed to end the line.
Output of an sql command is automatically piped through less command.
Favorite (named) queries
It is possible to store a query by name and reuse it later.
- Store the query select 1 as foo.
\ns foo select 1
- Execute named query foo.
\n foo > select 1 +----------+ | ?column? | +----------+ | 1 | +----------+ SELECT 1
Named queries can have substitution parameters. Parameters can be provided using:
- $n notation (1...N).
\ns foo select $1 \n foo 1
- bound variables.
\ns foo select %s \n foo 1
- Delete named query foo.