Psql Help
Psql includes a built-in help command that is amazing.
With no arguments, it returns all the help:
app_development=# \h
Available help:
ABORT ALTER TABLESPACE CREATE FOREIGN TABLE
...
With a Postgres command as an argument, it returns a specific help:
app_development=# \h abort;
Command: ABORT
Description: abort the current transaction
Syntax:
ABORT [ WORK | TRANSACTION ]
And with an asterisk, it prints the full description for all the help commands.
Plus we get this nicety:
Note: To simplify typing, commands that consists of several words do not have to be quoted. Thus it is fine to type \help alter table.
Write better SQL in your REPL today!
http://www.postgresql.org/docs/current/static/app-psql.html
h/t Jack Christensen
Tweet