Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEoNh-0008Ob-3a for pgsql-general@arkaria.postgresql.org; Mon, 30 Sep 2019 05:37:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iEoNg-0001wi-0F for pgsql-general@arkaria.postgresql.org; Mon, 30 Sep 2019 05:37:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEoNf-0001wV-MK for pgsql-general@lists.postgresql.org; Mon, 30 Sep 2019 05:37:55 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEoNd-00055g-8Y for pgsql-general@lists.postgresql.org; Mon, 30 Sep 2019 05:37:55 +0000 Received: from [192.168.127.1] (port=30998 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.2 (FreeBSD)) (envelope-from ) id 1iEoNY-000DRw-Fp; Mon, 30 Sep 2019 05:37:48 +0000 Received: from localhost ([127.0.0.1]:31977 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.92.1 (FreeBSD)) (envelope-from ) id 1iEoNY-000C1Z-BO; Mon, 30 Sep 2019 05:37:48 +0000 From: Andrew Gierth To: Tom Lane Cc: Alastair McKinley , "pgsql-general\@lists.postgresql.org" Subject: Re: Possible bug: SQL function parameter in window frame definition In-Reply-To: <28299.1569780931@sss.pgh.pa.us> (Tom Lane's message of "Sun, 29 Sep 2019 14:15:31 -0400") Message-ID: <87a7ammkaj.fsf@news-spur.riddles.org.uk> References: <87tv8wmn1i.fsf@news-spur.riddles.org.uk> <32758.1569703063@sss.pgh.pa.us> <87mueom8km.fsf@news-spur.riddles.org.uk> <26051.1569712242@sss.pgh.pa.us> <87impbn2d4.fsf@news-spur.riddles.org.uk> <87eezzmls2.fsf@news-spur.riddles.org.uk> <28299.1569780931@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) Date: Mon, 30 Sep 2019 06:37:48 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane writes: >> Here is a draft patch along those lines; the intent of this one is >> that no existing walker or mutator should need to change (the change >> to the dependency code is basically cosmetic I believe, just avoids >> walking some things twice). Tom> Hmm. I think this is a reasonable direction to go in, but Tom> what about groupingSets and rowMarks? groupingSets ultimately contains nothing but numbers which are meaningless without reference to the matching groupClause list. So anything that cares about those is really going to have to process them in its Query case in the walker function in order to get at both clauses. Similarly, rowMarks contains indexes into the rangetable (and no recursive substructure at all), so it's likewise better processed at the Query level. Tom> Also, in HEAD I'd be inclined to add assertions about utilityStmt Tom> being NULL. Yup. -- Andrew (irc:RhodiumToad)