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 1u2uKE-007c2Y-KW for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 16:00:22 +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 1u2uKD-00DpnL-2w for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 16:00:21 +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 1u2uKC-00DpnC-O1 for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 16:00:21 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2uKB-0045II-0v for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 16:00:20 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 079391380152; Thu, 10 Apr 2025 12:00:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 10 Apr 2025 12:00:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744300818; x=1744387218; bh=u2kfDhspglT10jiKK3LgnIqvNviRpTvgEArRzmpeKp4=; b= U64esANSHC91nVFVSNBYiKtLFpq1502Jto71JJHLq4ercg4OChL5++xv78PF4PKN c9tsRDRX4Y5wOxbSQvMq+UEuDkyd7zayR74z7NNVzuycWOpkqCEqf0OlHU5njIwr 1pRE6BeGbRzDjDnFf0BUhUyEVCoflXMxrveJwXTKSzWyrvfjcX9Y19jb3RKLDzcp ZDhBZccLLaXglEJKjvwQXISO8BMo1y+Irte2phpSXVB7OoV4bk2IXAIyPoNKaCEs k9zQmP/VHFAowEttZQ1cIWaEQ4XVQJCYWjgFVgDk27bxMY11mA2u68HbnPpg694z J0KsTg5qF6vDqXlQYj+xDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744300818; x= 1744387218; bh=u2kfDhspglT10jiKK3LgnIqvNviRpTvgEArRzmpeKp4=; b=c /kkcmMw9RruDndABzGkiWPgIMMOHinrPr7wIAYLrXRtPfkk3YB6rEe5+ExXuq/UT gwTzoHzgckcfH9Za2+WCMu9nWfGcair8xnbKvQIr8+48stQ20E2skv3MdN9gijj1 UJjgf/Rd2WCeYV84OyqqG5TyVQkyYRMYGCVdtFsrMLKOrzeSX194+P/YuTf/3aQi VImwSYy1h0hC74hcL0f4MNQfNU0OdU6R82S5IgUerJAzu3hsT5DLrBCRcgHwvlL+ 1RxNhQO9Z/GG9uq68c5iLvn9pa3j5J7cOtsbl93/1BZKaQUP3xGrHcmTqQxBoanb oYeboSANGZcofPhDSmFSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdelfeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddt vdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepuedufeejjefggfdt tdeghefgkeeuveekkeeiteettdekffehiedvtefhveffgeeunecuffhomhgrihhnpehpoh hsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpd hnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehnihgt ohestghrhihpthhonhgvtghtohhrrdgtohhmpdhrtghpthhtoheplhgruhhrvghniidrrg hlsggvsegthigsvghrthgvtgdrrghtpdhrtghpthhtohepshhplhgrrhhvseihrgdrrhhu pdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvg hsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Apr 2025 12:00:17 -0400 (EDT) Message-ID: <9e81428b-fb4c-4d72-9117-f18d262ead8c@aklaver.com> Date: Thu, 10 Apr 2025 09:00:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Interesting case of IMMUTABLE significantly hurting performance To: Nico Williams Cc: Laurenz Albe , Olleg Samoylov , "pgsql-generallists.postgresql.org" References: <662101e2-5ca5-4bf5-9307-2519efde8690@ya.ru> <8687df7d49bc4b28b41c7cf4e9ad1e15d383b2fa.camel@cybertec.at> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/10/25 08:48, Nico Williams wrote: > On Wed, Apr 09, 2025 at 02:43:11PM -0700, Adrian Klaver wrote: >> On 4/9/25 14:21, Nico Williams wrote: >>> That to_char is not immutable is not documented though. Though it's >>> clear when looking at the docs for the `jsonb_.*_tz()` functions. >> >> From here: >> >> https://www.postgresql.org/docs/current/catalog-pg-proc.html >> >> select proname, provolatile, prosrc from pg_proc where proname='to_char'; >> [...] > > I'm surprised to see that counted as docs, but good to know. When in doubt consult the system catalogs. My guess is the absence of specific volatility information in the data formatting functions is due to that information originating from a time before provolatile existed. Whereas the jsonb_.*_tz() functions are relatively new and where documented with knowledge of provolatile. -- Adrian Klaver adrian.klaver@aklaver.com