From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: wgyumg@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15836: Casting 'of' to boolean type should throw an invalid input syntax
Date: Wed, 12 Jun 2019 22:57:28 -0400
Message-ID: <5448.1560394648@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwZeQKTrv-r=0SrkSn50jHo0WkxjL7mKt0kxm6JYSkT68w@mail.gmail.com>
References: <15836-656fab055735f511@postgresql.org>
<CAKFQuwZeQKTrv-r=0SrkSn50jHo0WkxjL7mKt0kxm6JYSkT68w@mail.gmail.com>
"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=9729c9360886bee7feddc6a1124b0742d...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, wgyumg@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15836: Casting 'of' to boolean type should throw an invalid input syntax
In-Reply-To: <5448.1560394648@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox