Example 8-2 shows that
boolean values are output using the letters
t and f.

Tip: Values of the boolean type cannot be cast directly
to other types (e.g., CAST
(boolval AS integer) does
not work). This can be accomplished using the
CASE expression: CASE WHEN
boolval THEN 'value if true' ELSE
'value if false' END. See also Section 9.12.