Re: Boolean operators without commutators vs. ALL/ANY

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Boolean operators without commutators vs. ALL/ANY
Date: 2011-06-17 16:00:14
Message-ID: BANLkTik9R0ZMQ0-s4pN+TC+8C4jVCFGuaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 17, 2011 at 11:46 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> I guess this wouldn't be much of a problem if you could use ANY/ALL with
> a function instead of an operator, c.f. map().

Yeah. Or really what you want is a lambda-expression, rather than a
predefined function.

fold(bool_and, map { val ~ $0 } array)

I suspect that's darn hard to make work though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2011-06-17 16:03:41 Re: Boolean operators without commutators vs. ALL/ANY
Previous Message Andrew Dunstan 2011-06-17 15:53:56 Re: XPATH evaluation