Re: pg ANY/SOME ambiguity wrt sql standard?

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg ANY/SOME ambiguity wrt sql standard?
Date: 2004-05-02 09:12:44
Message-ID: Pine.GSO.4.58.0405021101210.27282@chailly99
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cri(dot)ensmp(dot)fr

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-05-02 11:11:49 Timezone database questions
Previous Message Peter Eisentraut 2004-05-02 07:44:25 Re: mingw configure failure workaround