From: Doug McNaught <doug@mcnaught.org>
To: Andreas Pflug <pgadmin@pse-consulting.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: plpgsql doesn't coerce boolean expressions to boolean
Date: 08 Sep 2003 12:35:37 -0400
Message-ID: <m3d6eb1bmu.fsf@varsoon.wireboard.com> (raw)
References: <15403.1063035632@sss.pgh.pa.us>
<3F5CAC68.30502@pse-consulting.de>
Andreas Pflug <pgadmin@pse-consulting.de> writes:
> Tom Lane wrote:
>
> >
> >2. Throw an error if the expression doesn't return boolean.
> >
> I'd opt for 2.
> It's quite common that newer compilers will detect more bogus coding
> than older ones. There might be existing functions that break from
> this because they rely on the current "feature", but there are
> probably others that will throw an exception, revealing bad coding
> (and delivering correct results just by chance, I've seen this more
> than once...)
I agree, and option 2 also makes sure that "bad" code will fail
cleanly, rather than possibly changing behavior and causing data
loss/corruption.
I agree with another poster that deprecation in 7.4 and removal in
7.5 might make sense.
-Doug
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-sql@postgresql.org
Cc: doug@mcnaught.org, pgadmin@pse-consulting.de, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: plpgsql doesn't coerce boolean expressions to boolean
In-Reply-To: <m3d6eb1bmu.fsf@varsoon.wireboard.com>
* 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