Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6A5A447671A for ; Mon, 28 Oct 2002 20:07:05 -0500 (EST) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id C0DD8476713 for ; Mon, 28 Oct 2002 20:07:04 -0500 (EST) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1802898 for pgsql-sql@postgresql.org; Mon, 28 Oct 2002 17:09:00 -0800 Content-Type: text/plain; charset="us-ascii" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-sql@postgresql.org Subject: BOOLEAN question Date: Mon, 28 Oct 2002 18:06:39 -0700 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200210281706.39015.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/384 X-Sequence-Number: 10101 Folks, Odd question: I have a query that returns a set of none to several rows. O= ne=20 column in these rows is BOOLEAN. I want the query to return: 1) TRUE if *any* of the BOOLEAN values is TRUE; 2) FALSE if *all* of the BOOLEAN values are FALSE; 3) FALSE or NULL if no rows are returned. I thought that I could do this through a MAX(boolean), but as it turns out,= =20 MAX(boolean) has not been defined in the standard 7.2.3. distro. I could= =20 define MAX(boolean), but I'm wondering if I'm missing something obvious. --=20 -Josh Berkus Aglio Database Solutions San Francisco