X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 471E4D1B543; Tue, 9 Sep 2003 17:58:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 50764-05; Tue, 9 Sep 2003 14:57:40 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 3414AD1B4E6; Tue, 9 Sep 2003 14:57:38 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h89HvNi07005; Tue, 9 Sep 2003 13:57:23 -0400 (EDT) From: Bruce Momjian Message-Id: <200309091757.h89HvNi07005@candle.pha.pa.us> Subject: Re: [HACKERS] plpgsql doesn't coerce boolean expressions to boolean In-Reply-To: <25047.1063122873@sss.pgh.pa.us> To: Tom Lane Date: Tue, 9 Sep 2003 13:57:23 -0400 (EDT) Cc: Manfred Koizar , pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/68 X-Sequence-Number: 15046 Tom Lane wrote: > Manfred Koizar writes: > > On Mon, 08 Sep 2003 11:40:32 -0400, Tom Lane > > 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. > > I'm willing to do that. OK, what release should we do this? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073