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 1xJCXp-000000002jL-1IhJ for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Oct 2026 16:18:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xJCXo-00000000nfl-09k7 for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Oct 2026 16:18:32 +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.98.2) (envelope-from ) id 1xJCXn-00000000nfd-3MLT for pgsql-bugs@lists.postgresql.org; Tue, 20 Oct 2026 16:18:31 +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.98.2) (envelope-from ) id 1xJCXl-000000002Gk-1VJB for pgsql-bugs@lists.postgresql.org; Tue, 20 Oct 2026 16:18:30 +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 69KGI5VS871539; Tue, 20 Oct 2026 12:18:05 -0400 From: Tom Lane To: Fujii Masao cc: Staroverov Ilja , Peter Eisentraut , "jj-zhang25@mails.tsinghua.edu.cn" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #19644: byteaout, float8out and float4out are marked IMMUTABLE but depend on GUCs In-reply-to: References: <19644-d6db3fb5e5ad92f4@postgresql.org> <1306744.1788318959@sss.pgh.pa.us> <1577102.1788542839@sss.pgh.pa.us> <61ca987c-8bd1-4380-b81a-72c94c36b41c@eisentraut.org> Comments: In-reply-to Fujii Masao message dated "Wed, 21 Oct 2026 01:05:23 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <871537.1792513085.1@sss.pgh.pa.us> Date: Tue, 20 Oct 2026 12:18:05 -0400 Message-ID: <871538.1792513085@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Fujii Masao writes: > Codex reported two other cases: > - Both xpath() overloads are marked IMMUTABLE, but use float8out() for > numeric results, so their output depends on extra_float_digits. > - quote_ident(text) is marked IMMUTABLE, but calls quote_identifier(), > whose output depends on quote_all_identifiers. > Should these functions also be marked STABLE? Thoughts? I don't mind marking xpath() as STABLE, but I wonder if doing so for quote_ident() would cause performance issues. But a quick look through our frontend programs didn't turn up any usages that look like they'd be candidates for constant-folding, so maybe it's fine. I agree we can't just leave it as-is, so the alternative would be to force the SQL function to use one behavior or the other. That might make people unhappy in a different way. regards, tom lane