Read the fine manual (RTFM)
RTFM is often (rudely) used to mean don’t bother me; I’m busy, or it is used as a stronger form of abuse. The strange thing is that asking you to read a manual is most often very good advice. Take the advice! The most important point to remember is that you should refer to a manual whose release version matches that of the server on which you are operating.
The PostgreSQL manual is very well-written and comprehensive in its coverage of specific topics. However, one of its main failings is that the documents aren’t organized in a way that helps somebody who is trying to learn PostgreSQL. They are organized from the perspective of people checking specific technical points so that they can decide whether their problem is a user error or something else. It sometimes answers what? but it seldom answers why? or how?
How to do it…
The main documents for each PostgreSQL release are available at http://www.postgresql.org/docs/manuals/.
These are the most frequently accessed parts of the documents:
- The Structured Query Language (SQL) command reference, as well as the client and server tools’ reference: http://www.postgresql.org/docs/current/interactive/reference.html
- Configuration: http://www.postgresql.org/docs/current/interactive/runtime-config.html
- Functions: http://www.postgresql.org/docs/current/interactive/functions.html
You can also grab yourself a PDF version of the manual, which can allow for easier searching in some cases. Don’t print it! The documents are about 2,800 pages of A4-sized sheets.
How it works…
PostgreSQL documents are written in Standard Generalized Markup Language (SGML), which is similar to, but not the same as, Extensible Markup Language (XML). These files are then processed to generate HyperText Markup Language (HTML) files, PDFs, and so on. This ensures that all the formats have exactly the same content. Then, you can choose the format you prefer, and you can even compile it in other formats, such as Electronic Publication (EPUB), Interchange File Format (INFO), and so on.
Moreover, the PostgreSQL manual is actually a subset of the PostgreSQL source code, so it evolves together with the software. It is written by the same people who make PostgreSQL, which gives you even more reasons to read it!
There’s more…
More information is also available at http://wiki.postgresql.org.
Many distributions offer packages that install static versions of the HTML documentation. For example, on Debian and Ubuntu, the documentation for the most recent stable PostgreSQL version is named postgresql-doc-16
.