It’s possible to get pretty good help on postgresql when using the command line programme psql:

\? shows you all the \ series commands \d shows you all tables, \c connects to another database, etc… \h shows you the sql syntax \h COMMAND shows you the syntax for that command

and, just in- here’s a good postgresql cheatsheet!