Re: BUG #15836: Casting 'of' to boolean type should throw an invalid input syntax
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: wgyumg@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2019-06-13T02:57:28Z
Lists: pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Wed, Jun 5, 2019 at 2:37 PM PG Bug reporting form <noreply@postgresql.org> > wrote: >> Converting 'of' to a boolean type should throw an invalid input syntax. > At this point raising a syntax error is undesirable, but the documentation > should be modified to match the source code, which does say: > src/utils/adt/bool.c > * Try to interpret value as boolean value. Valid values are: true, > * false, yes, no, on, off, 1, 0; as well as unique prefixes thereof. > The unique prefix part needs to make it to user-facing documentation. Agreed, the docs are misleading here. I pushed something to try to make it better: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9729c9360886bee7feddc6a1124b0742de4b9f3d regards, tom lane
Commits
-
Doc: improve description of allowed spellings for Boolean input.
- 9729c9360886 12.0 landed
- df88137a398b 9.4.23 landed
- afaa32daf293 11.4 landed
- 909a92e19552 10.9 landed
- 457dab1e7bc6 9.6.14 landed
- 1804185c2dbf 9.5.18 landed