May 2018
Intermediate to advanced
576 pages
30h 25m
English
Error messages can sometimes be cryptic, and you may be left wondering why did this error happen at all?
For this purpose, psql recognizes two variables, VERBOSITY and CONTEXT; valid values are terse, default, or verbose for the former, and never, errors, or always for the latter. A more verbose error message will hopefully specify extra detail, and the context information will be included. Here is an example to show the difference:
postgres=# \set VERBOSITY tersepostgres=# \set CONTEXT neverpostgres=# select * from missingtable;ERROR: relation "missingtable" does not exist at character 15
This is quite a simple error, so we don't actually need the extra detail, but it is nevertheless useful for illustrating the ...