PostgreSQL supports a single Boolean (or logical) data type: BOOLEAN ( BOOLEAN can be abbreviated as BOOL ). Size and Valid ValuesA BOOLEAN can hold the values TRUE , FALSE , or NULL , and consumes a single byte of storage. Syntax for Literal ValuesTable 2.16 shows the alternate spellings for BOOLEAN literals. Table 2.16. BOOLEAN Literal Syntax
Supported OperatorsThe only operators supported for the BOOLEAN data type are the logical operators shown in Table 2.17: Table 2.17. Logical Operators for BOOLEAN
I covered the AND , OR , and NOT operators in Chapter 1. For a complete definition of these operators, see Tables 1.3, 1.4, and 1.5. |