In PostgreSQL, you can use the to_char()
to output a number in a certain format, including with a plus or minus sign to indicate whether it’s a positive or negative number.
To do this, use one of S
, MI
, PL
, or SG
in your format string.
Another option is to use PR
in order to enclose any negative values in angle brackets.