May 2018
Intermediate to advanced
576 pages
30h 25m
English
In psql, you can enter the following two types of commands:
A meta-command is a command for the psql client, whereas SQL is sent to the database server. An example of a meta-command is \q, which tells the client to disconnect. All lines that begin with \ (backslash) as the first nonblank character are presumed to be meta-commands of some kind.
If it isn't a meta-command, then it's SQL. We keep reading SQL until we find a semicolon, so we can spread SQL across many lines and format it any way we find convenient.
The help command is the only exception. We provide this for people who are completely lost, which is a good thought; so let's start from there ourselves.
There are two types of help commands, ...