This page in other versions: Unsupported versions: 6.4

Boolean Type

Postgres supports bool as the SQL3 boolean type. bool can have one of only two states: 'true' or 'false'. A third state, 'unknown', is not implemented and is not suggested in SQL3; NULL is an effective substitute. bool can be used in any boolean expression, and boolean expressions always evaluate to a result compatible with this type.

bool uses 4 bytes of storage.

Table 8-12. Postgres Boolean Type

State Output Input
True 't' TRUE, 't', 'true', 'y', 'yes', '1'
False 'f' FALSE, 'f', 'false', 'n', 'no', '0'

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.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group