Community wiki answer:
FALSE as cited in the question context are keywords, not values that can be returned to a client. If
true as a value was returned that would be 4 times bigger than
t, so that's not better.
0 are often present as numbers so they would be harder to distinguish. OTOH
f is a strong visual hint that we have a
Boolean. Same as
N in a
boolean is neither
binary nor a
boolean and operates with a ternary logic around the values
Some other RDBMS lack a proper implementation, which may add to the confusion. If you want
1 instead, just cast the
Related update in Postgres 9.5:
- Use assignment cast behavior for data type conversions in PL/pgSQL assignments, rather than converting to and from text (Tom Lane)
This change causes conversions of Booleans to strings to produce true or false, not t or f. Other type conversions may succeed in more cases than before; for example, assigning a numeric value 3.9 to an integer variable will now assign 4 rather than failing. If no assignment-grade cast is defined for the particular source and destination types, PL/pgSQL will fall back to its old I/O conversion behavior.