Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egGz6-00085d-Lp for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jan 2018 21:29:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egGz5-0007KG-Pl for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jan 2018 21:28:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1egGz5-0007K6-Fj for pgsql-hackers@lists.postgresql.org; Mon, 29 Jan 2018 21:28:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egGz2-0001jx-Uj for pgsql-hackers@postgresql.org; Mon, 29 Jan 2018 21:28:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0TLSsYv010569; Mon, 29 Jan 2018 16:28:54 -0500 From: Tom Lane To: Oliver Ford cc: Erik Rijkers , Pg Hackers Subject: Re: Add RANGE with values and exclusions clauses to the Window Functions In-reply-to: References: <2c084c1c2bf599ceb2afa87874de8bc1@xs4all.nl> <13279.1515535159@sss.pgh.pa.us> <4139.1515567978@sss.pgh.pa.us> <27788.1517069693@sss.pgh.pa.us> Comments: In-reply-to Oliver Ford message dated "Mon, 29 Jan 2018 16:55:59 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10567.1517261334.1@sss.pgh.pa.us> Date: Mon, 29 Jan 2018 16:28:54 -0500 Message-ID: <10568.1517261334@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Oliver Ford writes: > [ 0001-window-frame-v9.patch ] I've started to go through this in some detail, and I'm wondering why you invented a FRAMEOPTION_EXCLUDE_NO_OTHERS option bit rather than just representing that choice as default (0). As you have it, a window definition that explicitly specifies EXCLUDE NO OTHERS will be considered unequal to one that just defaults to that behavior, in e.g. transformWindowFuncCall(). That seems undesirable, if not outright wrong. Against that, having the bit allows ruleutils.c to print "EXCLUDE NO OTHERS" when the input included that, but that seems like a wash if not an anti-feature. We've never been big on making ruleutils output distinguish explicit from implicit selection of a default setting, and in this case it could possibly lead to outputting a query in a form that is not backwards-compatible to older PG versions, when there's no need to be incompatible. If there's some other consideration I'm missing, please say what; otherwise I'll change it. BTW, I generally recommend not including a catversion change in submitted patches. It causes merge problems any time some other catversion-bumping patch gets committed, and it can't possibly be the right value for the final commit since you aren't likely to be able to predict that date in advance. It surely doesn't hurt to remind the committer that a catversion bump is needed, but just do that in the submission message. regards, tom lane