Re: pg ANY/SOME ambiguity wrt sql standard? - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pg ANY/SOME ambiguity wrt sql standard?
Date
Msg-id Pine.GSO.4.58.0405021101210.27282@chailly99
Whole thread Raw
In response to Re: pg ANY/SOME ambiguity wrt sql standard?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Dear Tom,

> > The standard "EVERY" is fine for postgres, the issue is only with
> > ANY/SOME. Do you think that bool_and should be proposed anyway for
> > homogeneity with bool_or?
>
> I think EVERY is actively misleading, because it does *not* imply that
> every input is TRUE.  The spec says these aggregates should ignore
> nulls, and so a true result only implies that there were no FALSE
> inputs.
>
> OTOH one could argue that the ignore-nulls behavior makes this not a
> true analog of AND, either ...

Argh, how stupid I am, I missread the specification! Then the patch I sent
yesterday is wrong if NULL values are encountered:-( I should learn how to
read sometimes...

However, I did not name the boolean and aggregate EVERY, it is BOOL_AND
(in the patch), because I tend to prefer homogeneity.

I'll resubmit a patch later.

-- 
Fabien Coelho - coelho@cri.ensmp.fr


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: mingw configure failure workaround
Next
From: Bruce Momjian
Date:
Subject: Timezone database questions