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 1iFgUF-0007rH-In for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Oct 2019 15:24:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iFgUD-0005rs-Mj for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Oct 2019 15:24:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFgUD-0005rc-B7 for pgsql-hackers@lists.postgresql.org; Wed, 02 Oct 2019 15:24:17 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iFgU6-0003OK-Gp for pgsql-hackers@lists.postgresql.org; Wed, 02 Oct 2019 15:24:16 +0000 Received: from [192.168.127.1] (port=55345 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1iFgU1-0001p3-TS; Wed, 02 Oct 2019 15:24:05 +0000 Received: from localhost ([127.0.0.1]:18533 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.92.1 (FreeBSD)) (envelope-from ) id 1iFgU1-0000uk-LK; Wed, 02 Oct 2019 15:24:05 +0000 From: Andrew Gierth To: Tom Lane Cc: pgsql-hackers@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: <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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) Date: Wed, 02 Oct 2019 16:24:05 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk [moving to -hackers, removing OP and -general] >>>>> "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: #3 0x0000000000bb9144 in ExceptionalCondition (conditionName=0xd3c7a9 "query->utilityStmt == NULL", errorType=0xc3da24 "FailedAssertion", fileName=0xd641f8 "nodeFuncs.c", lineNumber=2280) at assert.c:54 #4 0x000000000081268e in query_tree_walker (query=0x80bb34220, walker=0x98d150 , context=0x7fffffffc768, flags=0) at nodeFuncs.c:2280 #5 0x0000000000815a29 in query_or_expression_tree_walker (node=0x80bb34220, walker=0x98d150 , context=0x7fffffffc768, flags=0) at nodeFuncs.c:3344 #6 0x000000000098d13d in rangeTableEntry_used (node=0x80bb34220, rt_index=1, sublevels_up=0) at rewriteManip.c:900 #7 0x0000000000698ce6 in transformRuleStmt (stmt=0x80241bd20, queryString=0x80241b120 "create rule r3 as on delete to rules_src do notify rules_src_deletion;", actions=0x7fffffffc968, whereClause=0x7fffffffc960) at parse_utilcmd.c:2883 #8 0x00000000009819c5 in DefineRule (stmt=0x80241bd20, queryString=0x80241b120 "create rule r3 as on delete to rules_src do notify rules_src_deletion;") at rewriteDefine.c:206 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? -- Andrew (irc:RhodiumToad)