Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5B5FA47617A for ; Wed, 30 Oct 2002 11:37:56 -0500 (EST) Received: from beamish.nsd.ca (unknown [205.150.156.194]) by postgresql.org (Postfix) with ESMTP id 17FA24759F2 for ; Wed, 30 Oct 2002 11:37:54 -0500 (EST) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id LAA01017; Wed, 30 Oct 2002 11:37:56 -0500 X-Authentication-Warning: beamish.nsd.ca: smap set sender to using -f Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam) id xma001013; Wed, 30 Oct 02 11:37:50 -0500 Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148]) by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id LAA18528; Wed, 30 Oct 2002 11:37:09 -0500 Message-ID: <3DC00AFA.3992DF0F@nsd.ca> Date: Wed, 30 Oct 2002 11:38:18 -0500 From: Jean-Luc Lachance X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686) X-Accept-Language: en MIME-Version: 1.0 To: Josh Berkus , Tom Lane , pgsql-sql@postgresql.org Subject: Re: BOOLEAN question References: <3DC00823.7396E79C@nsd.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/408 X-Sequence-Number: 10125 Of course, I meant SELECT COALESCE( (SELECT true FROM ... WHERE ... AND boolcol LIMIT 1), FALSE); Jean-Luc Lachance wrote: > > Why not simply: > > SELECT COALESCE( (SELECT true FROM ... WHERE boolcol LIMIT 1), FALSE); > > JLL > > Josh Berkus wrote: > > > > Tom, > > > > > Perhaps > > > SELECT true = ANY (SELECT boolcol FROM ...); > > > or > > > SELECT true IN (SELECT boolcol FROM ...); > > >