July 2005
Intermediate to advanced
1032 pages
27h 10m
English
PostgreSQL supports a single Boolean (or logical) data type: BOOLEAN (BOOLEAN can be abbreviated as BOOL).
A BOOLEAN can hold the values TRUE, FALSE, or NULL, and consumes a single byte of storage.
Table 2.16 shows the alternate spellings for BOOLEAN literals.
| Common Name | Synonyms |
|---|---|
| TRUE | true, 't', 'y', 'yes', 1 |
| FALSE | false, 'f', 'n', 'no', 0 |
The only operators supported for the BOOLEAN data type are the logical operators shown in Table 2.17:
| Data Types | Valid Operators (θ) |
|---|---|
| BOOLEAN θ BOOLEAN | AND OR NOT |
I covered the AND, OR, and NOT operators in Chapter 1. For a complete definition of these ...
Read now
Unlock full access