Ian Parker shows off some meta-commands:
If you manage PostgreSQL from a terminal you already know
psql, the interactive client that ships with every installation. Most developers use it for the basics—runningSELECTstatements, loading a.sqlfile, maybe poking around with\dtto see which tables exist.Beneath that familiar surface, though,
psqlhides a rich toolbox of meta-commands. These commands, all prefixed with a backslash, live inside the client. They’re not SQL, they’re shortcuts built intopsqlitself, and they can make everyday tasks faster and far less error-prone.
Read on for six of these, including examples like \watch to view something with periodic refresh.