From: Manfred Koizar <mkoi-pg@aon.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: plpgsql doesn't coerce boolean expressions to boolean
Date: Tue, 09 Sep 2003 16:56:20 +0200
Message-ID: <2uorlv41aahh6fp3773r5pkjdnm26m4cc5@email.aon.at> (raw)
In-Reply-To: <15403.1063035632@sss.pgh.pa.us>
References: <15403.1063035632@sss.pgh.pa.us>
On Mon, 08 Sep 2003 11:40:32 -0400, Tom Lane <tgl@sss.pgh.pa.us>
wrote:
>4. Use the parser's coerce_to_boolean procedure, so that nonbooleans
> will be accepted in exactly the same cases where they'd be accepted
> in a boolean-requiring SQL construct (such as CASE). (By default,
> none are, so this isn't really different from #2. But people could
> create casts to boolean to override this behavior in a controlled
> fashion.)
I vote for 4. And - being fully aware of similar proposals having
failed miserably - I propose to proceed as follows:
If the current behaviour is considered a bug, let i=4, else let i=5.
In 7.i: Create a new GUC variable "plpgsql_strict_boolean" (silly
name, I know) in the "VERSION/PLATFORM COMPATIBILITY" section of
postgresql.conf. Make the new behaviour dependent on this variable.
Default plpgsql_strict_boolean to false. Place a warning into the
release notes and maybe into the plpgsql documentation.
In 7.j, j>i: Change the default value of plpgsql_strict_boolean to
true. Issue WARNINGs or NOTICEs as appropriate. Update
documentation.
In 7.k, k>j: Remove old behaviour and GUC variable. Update
documentation.
Servus
Manfred
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mkoi-pg@aon.at, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: plpgsql doesn't coerce boolean expressions to boolean
In-Reply-To: <2uorlv41aahh6fp3773r5pkjdnm26m4cc5@email.aon.at>
References: <15403.1063035632@sss.pgh.pa.us> <2uorlv41aahh6fp3773r5pkjdnm26m4cc5@email.aon.at>
* 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