The psql client is maintained by the PostgreSQL community, and it's part of the PostgreSQL binary distribution. psql has an overwhelming number of features, such as the following:
- psql is configurable: psql can be configured easily. The configuration might be applied to user-session behavior, such as commit and rollback, a psql prompt, history files, and even shortcuts for predefined SQL statements.
- Integration with editor and pager tools: The psql query result can be directed to your favorite pager, such as less or more. Also, psql doesn't come with an editor, but it can utilize several editors. The following example shows how to use the nano editor to edit a function:
postgres=# \setenv PSQL_EDITOR /bin/nanopostgres=# ...