Reputation: 1
With \help
or \h
below, I could show the SQL commands as shown below:
\help
Or:
\h
postgres=# \help
Available help:
ABORT CREATE USER
ALTER AGGREGATE CREATE USER MAPPING
ALTER COLLATION CREATE VIEW
ALTER CONVERSION DEALLOCATE
ALTER DATABASE DECLARE
ALTER DEFAULT PRIVILEGES DELETE
ALTER DOMAIN DISCARD
ALTER EVENT TRIGGER DO
ALTER EXTENSION DROP ACCESS METHOD
ALTER FOREIGN DATA WRAPPER DROP AGGREGATE
ALTER FOREIGN TABLE DROP CAST
ALTER FUNCTION DROP COLLATION
ALTER GROUP DROP CONVERSION
ALTER INDEX DROP DATABASE
ALTER LANGUAGE DROP DOMAIN
...
Now, how can I show the backslash commands in PostgreSQL like \l
, \dt
, \q
, \h
, etc?
Upvotes: 1
Views: 533
Reputation: 1
With \?
below, you can show the backslash commands in PostgreSQL as shown below:
\?
postgres=# \?
General
\copyright show PostgreSQL usage and distribution terms
\crosstabview [COLUMNS] execute query and display results in crosstab
\errverbose show most recent error message at maximum verbosity
\g [(OPTIONS)] [FILE] execute query (and send results to file or |pipe);
\g with no arguments is equivalent to a semicolon
\gdesc describe result of query, without executing it
\gexec execute query, then execute each value in its result
\gset [PREFIX] execute query and store results in psql variables
\gx [(OPTIONS)] [FILE] as \g, but forces expanded output mode
\q quit psql
\watch [SEC] execute query every SEC seconds
Help
\? [commands] show help on backslash commands
\? options show help on psql command-line options
\? variables show help on special variables
\h [NAME] help on syntax of SQL commands, * for all commands
...
Upvotes: 1