BOOLEAN question

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: BOOLEAN question
Date: 2002-10-29 01:06:39
Message-ID: 200210281706.39015.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Berkus
Aglio Database Solutions
San Francisco

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-10-29 01:26:24 Re: BOOLEAN question
Previous Message Chad Thompson 2002-10-28 21:22:02 Re: subscrip out of range