Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t2Bxt-002Qhb-0r for pgsql-bugs@arkaria.postgresql.org; Sat, 19 Oct 2024 16:06:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t2Bxq-004eKq-8q for pgsql-bugs@arkaria.postgresql.org; Sat, 19 Oct 2024 16:06:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t2Bxp-004eKi-WC for pgsql-bugs@lists.postgresql.org; Sat, 19 Oct 2024 16:06:02 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t2Bxn-001ie1-Qc for pgsql-bugs@lists.postgresql.org; Sat, 19 Oct 2024 16:06:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 49JG5vAE1115552; Sat, 19 Oct 2024 12:05:57 -0400 From: Tom Lane To: Amit Langote cc: Tender Wang , Michael Paquier , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault In-reply-to: References: <18657-1b90ccce2b16bdb8@postgresql.org> <71060.1729088799@sss.pgh.pa.us> <508107.1729126612@sss.pgh.pa.us> <569213.1729138329@sss.pgh.pa.us> <711200.1729197017@sss.pgh.pa.us> <907538.1729272125@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Sat, 19 Oct 2024 12:12:57 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1115550.1729353957.1@sss.pgh.pa.us> Date: Sat, 19 Oct 2024 12:05:57 -0400 Message-ID: <1115551.1729353957@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amit Langote writes: > Updated patch attached. v8 is OK by me. Personally I would not bother with the Asserts that raw_expr/formatted_expr are not null, in either place; the code doesn't actually depend on that, and IMO it's inconsistent with the style of surrounding code. But that's not a hill to die on. regards, tom lane