Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xo61u-0008Jn-IE for pgsql-docs@arkaria.postgresql.org; Tue, 11 Nov 2014 07:38:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xo61t-0000QK-UT for pgsql-docs@arkaria.postgresql.org; Tue, 11 Nov 2014 07:38:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xo61r-0000QA-Rw for pgsql-docs@postgresql.org; Tue, 11 Nov 2014 07:38:20 +0000 Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xo61n-0000Dl-Lc for pgsql-docs@postgresql.org; Tue, 11 Nov 2014 07:38:18 +0000 Received: by mail-ie0-f178.google.com with SMTP id rp18so10656745iec.23 for ; Mon, 10 Nov 2014 23:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juffo.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6skyza9z/ZEGxn8K32fZxbGxx2RO9HbBZzjWNucLMRc=; b=DhekkklRPNXnSc6G/HJ5P3FhzUmdZb9ZvOo8bDaxvpdx2eRCi4rjtvw4Cfh4HUm2LX en8Qd+qYMHNoyKlosAj3sTaVN5eq/w52+PLy15wMn1YE9GvcxDOgdRDJ7u6huSvcd8sf 4LJYN+IZHwJRRqiSLrkH/G39pb//C4NoquBzE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=6skyza9z/ZEGxn8K32fZxbGxx2RO9HbBZzjWNucLMRc=; b=Xm0qD5s8PQj0wQ8k6V0/M1O2nRP0CMHVT8sBYNrAAR8prsmJZ99gbAZ+pTDuoCnzrd K0vHWPpYhh33pFK4dn1RxzL9rNPnUtHkhJtwXhCg2F2RbSA/HADEwmsjRxru/gCVa2Q5 Q3B4V5FUJdxHI8uL4qfZL2XVxP+mZrQtW5DR4lkm+VoDcr5qHaqeh5xr4a1H3vN17six MMecH3BB7T2WJaCvjfolcM0sxT/oWfu7dQl4myfMEXCa67LRF9tdieph5n7z+v/ifsNA gJBN2I2nl881SXBJER68iGfSwj8P42c+V3bFIMGc+VAOi1Tuw/mzUuqMrOZdePIplDMo 5wiA== X-Gm-Message-State: ALoCoQmpfMOI5ztEVSctjq74CYDlyvl+A4Z7wb4Zs16mUOWnLsCRKdvoTxhpsRdOhiEvkhAL+TX+ X-Received: by 10.43.81.135 with SMTP id zy7mr7246702icb.63.1415691492431; Mon, 10 Nov 2014 23:38:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.162.78 with HTTP; Mon, 10 Nov 2014 23:37:42 -0800 (PST) In-Reply-To: References: <20141013110542.25460.3900@wrigleys.postgresql.org> From: Marti Raudsepp Date: Tue, 11 Nov 2014 09:37:42 +0200 Message-ID: Subject: Re: [BUGS] BUG #11661: CASE ELSE is evaluated although condition is true To: Michael Paquier Cc: michael@aplaypowered.com, pgsql-bugs@postgresql.org, pgsql-docs Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Hi On Tue, Nov 11, 2014 at 9:14 AM, Michael Paquier wrote: > This patch does not compile properly as a is missing, and I > think that you actually want to add this sect2 block at the bottom the > sect1 block for conditional functions. Sorry, I never got around to testing the build because I found a working DocBook envrionment a PITA to set up. Should have mentioned that in my email. > "implementation" is as well a > bit too general to name such a section, something like > "functions-conditional-implementation" would be better. +1 > Also, I am a > bit dubious about adding a mention aggregate functions and their > elements being evaluated in a paragraph for GROUP BY and HAVING > clause. 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? Regards, Marti -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs