Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Marti Raudsepp <marti(at)juffo(dot)org>
Cc: michael(at)aplaypowered(dot)com, pgsql-bugs(at)postgresql(dot)org, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true
Date: 2014-11-11 07:52:42
Message-ID: CAB7nPqT-73CCO-1WnrTa51iNpBdsUmQs_5ADmVkPBWM+oRu76A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs

On Tue, Nov 11, 2014 at 4:37 PM, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
> Why? This page explains in what order the expressions in a SELECT
> query are processed. Aggregates can only be found in SELECT queries
> and their semantics are non-trivial, so it seems like a big omission
> to me that their relation to other clauses is not discussed.
>
> I think that's the most appropriate place for that, because GROUP BY,
> HAVING and aggregates are closely related. And their execution occurs
> after evaluating GROUP BY keys and before HAVING predicates, where
> else would one put it?
Ah, OK. I wasn't aware of this execution order. Now we could as well
split the description flow into more tiny paragraphs but this does not
seem worth it. So what about the attached then?
--
Michael

Attachment Content-Type Size
20141111_conditional_funcs_doc_v2.patch application/x-patch 2.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marti Raudsepp 2014-11-11 08:26:02 Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true
Previous Message Marti Raudsepp 2014-11-11 07:37:42 Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true

Browse pgsql-docs by date

  From Date Subject
Next Message Marti Raudsepp 2014-11-11 08:26:02 Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true
Previous Message Marti Raudsepp 2014-11-11 07:37:42 Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true