pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Pflug <pgadmin@pse-consulting.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: plpgsql doesn't coerce boolean expressions to boolean
Date: Mon, 08 Sep 2003 18:20:56 +0200
Message-ID: <3F5CAC68.30502@pse-consulting.de> (raw)
In-Reply-To: <15403.1063035632@sss.pgh.pa.us>
References: <15403.1063035632@sss.pgh.pa.us>

Tom Lane wrote:

>Here are some possible responses, roughly in order of difficulty
>to implement:
>
>1. Leave well enough alone (and perhaps document the behavior).
>
>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...)

Regards,
Andreas





view thread (25+ messages)  latest in thread

Message-ID: <3F5CAC68.30502@pse-consulting.de>
Permalink:  ../3F5CAC68.30502@pse-consulting.de/
Also on:    postgresql.org/message-id/3F5CAC68.30502@pse-consulting.de

 · 

reply

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: 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: <3F5CAC68.30502@pse-consulting.de>

* 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