BOOLEAN question - Mailing list pgsql-sql

From Josh Berkus
Subject BOOLEAN question
Date
Msg-id 200210281706.39015.josh@agliodbs.com
Whole thread Raw
Responses Re: BOOLEAN question
Re: BOOLEAN question
List pgsql-sql
Folks,

Odd question:  I have a query that returns a set of none to several rows. One
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,
MAX(boolean) has not been defined in the standard 7.2.3. distro.  I could
define MAX(boolean), but I'm wondering if I'm missing something obvious.

--
-Josh BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: "Chad Thompson"
Date:
Subject: Re: subscrip out of range
Next
From: Stephan Szabo
Date:
Subject: Re: BOOLEAN question