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.98.2) (envelope-from ) id 1xRGpb-00000000q3w-3w6t for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2026 22:30:15 +0000 Received: from localhost ([127.0.0.1]:34592 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xRGpa-0000000DLTx-2ARd for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2026 22:30:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:56478) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xRGoQ-0000000DISj-3xub for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 22:29:03 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xRGoK-00000000XgL-4BDP for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 22:29:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 6ABMStZQ3415899; Wed, 11 Nov 2026 17:28:55 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 sss.pgh.pa.us 6ABMStZQ3415899 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sss.pgh.pa.us; s=default; t=1794436135; bh=BRSuW5HzdmmYZ8p0B73zsynDsdslRpeCg5/Oo6o//4o=; h=From:To:cc:Subject:In-reply-to:References:Date:From; b=SJZBDXhEaqZ4ZOgMyA6YJYGk2RlMHZrq+bk1FHd7Og62CUTYcBbTLZEF5muBUBN+J rAcSNJWsgRd83VLzYZKoV6QDyvnlJ06vh2Y6swW6XbpJAt+AliBkXtmHFVXQaIeWxy rAn7qJY5B1o/bL9YqOsKNv8X98JnnJ2ae7OVQiDA= From: Tom Lane To: 303677365@qq.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19840: contain_mutable_functions() misses VOLATILE sub-expressions in SQL/JSON functions when the jsonpath In-reply-to: <19840-7d5243be84d7ecd3@postgresql.org> References: <19840-7d5243be84d7ecd3@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sat, 07 Nov 2026 03:52:57 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3415897.1794436135.1@sss.pgh.pa.us> Date: Wed, 11 Nov 2026 17:28:55 -0500 Message-ID: <3415898.1794436135@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > When an SQL/JSON function's path expression is a NULL jsonpath constant, > `contain_mutable_functions()` wrongly reports the whole expression as > immutable, so VOLATILE sub-expressions in the same JsonExpr (RETURNING > coercion, PASSING values, DEFAULT/ON ERROR expressions) escape the > check. Yup, clearly a thinko, thanks for the report. regards, tom lane