PostgreSQL

PostgreSQL Elephant Logo

N.2. Configuring the Colors #

The actual colors to be used are configured using the environment variable PG_COLORS (note plural). The value is a colon-separated list of `key=value` pairs. The keys specify what the color is to be used for. The values are SGR (Select Graphic Rendition) specifications, which are interpreted by the terminal.

The following keys are currently in use:

error

used to highlight the text “[.quote]#error”# in error messages

warning

used to highlight the text “[.quote]#warning”# in warning messages

note

used to highlight the text “[.quote]#detail”# and “[.quote]#hint”# in such messages

locus

used to highlight location information (e.g., program name and file name) in messages

The default value is error=01;31:warning=01;35:note=01;36:locus=01 (01;31 = bold red, 01;35 = bold magenta, 01;36 = bold cyan, 01 = bold default color).

Tip

This color specification format is also used by other software packages such as GCC, GNU coreutils, and GNU grep.


Prev Up Next

N.1. When Color is Used

Home

Appendix O. Obsolete or Renamed Features

Submit correction

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.

Copyright © 1996-2024 The PostgreSQL Global Development Group