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.96) (envelope-from ) id 1vne74-009oRx-0H for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Feb 2026 14:44:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vne72-00BfKh-31 for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Feb 2026 14:44:12 +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.96) (envelope-from ) id 1vne72-00BfKZ-22 for pgsql-hackers@lists.postgresql.org; Wed, 04 Feb 2026 14:44:12 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vne70-00000000XJZ-2rDq for pgsql-hackers@postgresql.org; Wed, 04 Feb 2026 14:44:11 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 991E77A0155; Wed, 4 Feb 2026 09:44:09 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Wed, 04 Feb 2026 09:44:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; 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=fm2; t=1770216249; x=1770302649; bh=rdkfv+mAUbx6UI0IvXa0kY/tqeQWk/SB m7AduunvqIo=; b=RqsNWiuXl5qyYToryyssuIA/HgaXh5a45cIFf1ut46OiJPs6 ToblGfjOEme//GrPOZM940ACRHo+jNbA89bkmmcLmYL4VSnYuuH/Pc4HPNZCCyiH ReLQaG2P25HQNI4D6D4YUtG5yiIb+uU+m9ezYpMKHBq8/1zEiPIaOIEMrMV/Tocm ITpeioTgVZgHcdVeuYn5+MRopBJ/SnY7to9HRoF5QJzkFH4PtUBqnlnzquiDGCrS c5f/60QAP43BZ2a1iuJCDL/UY2+zROJVst/9ltFt+mY36xg9enJb6DA17Ss0piaB M1h9pf1zTIRaSXdIhF2+sdjMrOh3EmZ8IDF0dw== 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=fm3; t=1770216249; x= 1770302649; bh=rdkfv+mAUbx6UI0IvXa0kY/tqeQWk/SBm7AduunvqIo=; b=P 1q2xQ1JIFGHas2b9xCwX8cyF9kmurq15dfXcdGlhTcDqWnImEZiqfsEFCXg9Bp9K xZxkPbOZplzPBK4qdjyuLL33yLwHyDEDYzMORf/uN62dJRSpP6LsUIwUFukBxQEl 9+elJLBZCqpTJTlJlz1FMCJp2RQLQk36wos5JJscRJITey+mM+qaUlgp6gkS0rwu ofTB+dUu9YSyJVhqlRoLfsVhFKUdZxZM8CtW+ivOQFeczxb23w7fBTPbA+hqPVgL 396rUblAE8NILL/ntgDKDLg5eDY5C90S67y8T0AfUUfkF/PMQ5cop3k1BS7oGuCa TrhRvsSbOS82bR/OtJXIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddukedvjeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peduuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepnhgrthhhrghnuggsohhssh grrhhtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepghhilhhlvghssegurghrohhlugdr nhgvthdprhgtphhtthhopeiishholhhtrdhprghrrhgrghhisehpvghrtghonhgrrdgtoh hmpdhrtghpthhtohepjhgrphhinhhliheshhhothhmrghilhdrtghomhdprhgtphhtthho pehshhhihihuvghfvghiuddttdegsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhsih hnghhhuhgrlhhutghkhieluddvsehfohigmhgrihhlrdgtohhmpdhrtghpthhtohepphhg shhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprg hnughrvgifseguuhhnshhlrghnvgdrnhgvthdprhgtphhtthhopehtghhlsehsshhsrdhp ghhhrdhprgdruhhs X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Feb 2026 09:44:06 -0500 (EST) Message-ID: <1f4d0b80-3fea-4f4d-8d33-a652ea23e90b@eisentraut.org> Date: Wed, 4 Feb 2026 15:44:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Pasword expiration warning To: Nathan Bossart , Gilles Darold Cc: Zsolt Parragi , Japin Li , Yuefei Shi , songjinzhou , PostgreSQL Hackers , Andrew Dunstan , Tom Lane , liu xiaohui , Steven Niu References: <197512e0-8116-4776-a600-822d29ee68a6@darold.net> Content-Language: en-US From: Peter Eisentraut 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 03.02.26 16:28, Nathan Bossart wrote: > + detail = psprintf(_("The password for role \"%s\" will expire in " > + INT64_FORMAT " day(s), " INT64_FORMAT > + " hour(s), " INT64_FORMAT " minute(s)."), > + role, days, hours, minutes); You cannot use INT64_FORMAT inside translatable messages. But you can use PRId64. Using the type TimestampTz for what are essentially interval/duration quantities is a bit weird and confusing. So maybe another placeholder would be more appropriate. That said, I find writing plurals with "(s)" kind of lame. It's not a good look. It's a bit difficult to do this correctly when you have three separate values in one string. I would consider for example just showing the number of days if the value is larger than one day, number hours if it's larger than one hour, else minutes. I don't think you need minute-precision when the expiration time is several days out. Alternatively, just print the actual expiration timestamp.