Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okSy2-0004sE-EY for pgsql-general@arkaria.postgresql.org; Mon, 17 Oct 2022 16:27:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1okSy0-0002ZE-U1 for pgsql-general@arkaria.postgresql.org; Mon, 17 Oct 2022 16:27:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okSy0-0002Z5-JY for pgsql-general@lists.postgresql.org; Mon, 17 Oct 2022 16:27:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okSxy-0001l6-8v for pgsql-general@lists.postgresql.org; Mon, 17 Oct 2022 16:27:51 +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 29HGRdZU2336718; Mon, 17 Oct 2022 12:27:39 -0400 From: Tom Lane To: "qiumingcheng" cc: "Laurenz Albe" , "Julien Rouhaud" , "pgsql-general" , "yuexingzhi" Subject: Re: =?UTF-8?B?5Zue5aSN77ya5Zue5aSN77ya5Zue5aSN77ya5Zue5aSN77yaQSBxdWVzdGlvbiBhYm91dCBs?= =?UTF-8?B?ZWFrcHJvb2Y=?= In-reply-to: References: <9cc93fdc-2f99-4963-b895-169135b742a8.qiumingcheng@aliyun.com> <20221017014020.qpu2f5yy4lridhic@jrouhaud> ,<2067840.1665971686@sss.pgh.pa.us> <9b7029cb-cd0d-494d-8628-93c7f8948117.qiumingcheng@aliyun.com> ,<2077794.1665977617@sss.pgh.pa.us> ,<9e253a3226436819f0aaf59fb82137477d9f5a78.camel@cybertec.at> <195c5d95-8749-4419-a4f4-604cc8c937ec.qiumingcheng@aliyun.com>,<2163397.1666015638@sss.pgh.pa.us> Comments: In-reply-to "qiumingcheng" message dated "Mon, 17 Oct 2022 23:47:19 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2336716.1666024059.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 17 Oct 2022 12:27:39 -0400 Message-ID: <2336717.1666024059@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "qiumingcheng" writes: > Yes, It's capable of throwing an error(timestamp out of range) , but the > message "timestamp out of range" is not sensitive information. Really? Whether that's true at all is a matter of opinion. There's also the prospect that somebody could determine the value of a supposedly-unreadable timestamp by seeing how big an interval could be added to it without overflow. Maybe that's infeasible because of timestamp_pl_interval not being marked leakproof, but then we're getting into precisely the sort of conditional-on-other-assumptions reasoning that we don't want to indulge in. > Only from this function(timestamp_gt_timestamptz), can it be marked as l= eakproof? Project policy is that we will not mark a function as leakproof unless it's evident from the text of the function that it can't throw errors. I don't see a good argument for making a exception for this one. regards, tom lane