Allow leading and trailing whitespace in the input to the boolean
Neil Conway <neilc@samurai.com>
Allow leading and trailing whitespace in the input to the boolean type. Also, add explicit casts between boolean and text/varchar. Both of these changes are for conformance with SQL:2003. Update the regression tests, bump the catversion.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/datatype.sgml | modified | +4 −4 |
| src/backend/utils/adt/bool.c | modified | +57 −11 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_cast.h | modified | +5 −1 |
| src/include/catalog/pg_proc.h | modified | +5 −1 |
| src/include/utils/builtins.h | modified | +3 −1 |
| src/test/regress/expected/boolean.out | modified | +25 −1 |
| src/test/regress/sql/boolean.sql | modified | +9 −1 |