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 1iFgca-0008CC-RS for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Oct 2019 15:32: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 1iFgcZ-0008VD-Da for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Oct 2019 15:32:55 +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 1iFgcZ-0008V6-4w for pgsql-hackers@lists.postgresql.org; Wed, 02 Oct 2019 15:32:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFgcX-0001hK-10 for pgsql-hackers@lists.postgresql.org; Wed, 02 Oct 2019 15:32:54 +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 x92FWp4m006667; Wed, 2 Oct 2019 11:32:51 -0400 From: Tom Lane To: Andrew Gierth cc: pgsql-hackers@lists.postgresql.org Subject: Re: Possible bug: SQL function parameter in window frame definition In-reply-to: <877e5n2n70.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> <877e5n2n70.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Wed, 02 Oct 2019 16:24:05 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6665.1570030371.1@sss.pgh.pa.us> Date: Wed, 02 Oct 2019 11:32:51 -0400 Message-ID: <6666.1570030371@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Also, in HEAD I'd be inclined to add assertions about utilityStmt > Tom> being NULL. > Tried this. The assertion is hit: > ... > Any suggestions where best to fix this? transformRuleStmt could be > taught to skip a lot of the per-Query stuff it does in the event that > the Query is actually a NOTIFY, or a check for NOTIFY could be added > further down the stack, e.g. in rangeTableEntry_used. Any preferences? Hm. transformRuleStmt already does special-case utility statements to some extent, so my inclination would be to make it do more of that. However, it looks like that might end up with rather spaghetti-ish code, as that function is kind of messy already. Or we could abandon the notion of adding the assertion. I don't know how much work it's worth. regards, tom lane