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 1n657a-0007U3-AY for pgsql-general@arkaria.postgresql.org; Sat, 08 Jan 2022 06:22:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n657Y-0003bS-3L for pgsql-general@arkaria.postgresql.org; Sat, 08 Jan 2022 06:22:32 +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 1n657X-0003bJ-Mf for pgsql-general@lists.postgresql.org; Sat, 08 Jan 2022 06:22:31 +0000 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n657U-00056k-EK for pgsql-general@lists.postgresql.org; Sat, 08 Jan 2022 06:22:30 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4JW94023gBzQjf1; Sat, 8 Jan 2022 07:22:24 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1641622942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4mtBU7i7HOspdbrjv8yt0KvxMbAxx3m2N3Kyk9+jU2o=; b=O45hVw2SqjSRCnkPuJRKrJxfb33r7f4Kt5KIH3PAd0AYCiyH3qJDcYbO11JlFAgY30dxOR 9rXlULSj5reQJoJhKcZKlkr0S++Ygmp8Lv/5sIzbfn57wBtVXZacEh5pce+H5rUpA3K72s UuWZld4wIuaZ/xyUQygzcdjXJ0ZGikcwQQPef7m8mU8y7R30s+RWQcmothrAF1MkiF6JVO Fht9OZ6ESi/JlHubzc9li1F9KE8EWKmrRag36JAktnWvHSkQt9UgwV/W70fB9sJlOot2iR xpJUEfLVc5UZYOBehFNVCrJFFwns+hsrBH7gZaiOySYznxuIy6/SJN61P+09Lw== Date: Sat, 8 Jan 2022 07:22:19 +0100 (CET) From: ewie@mailbox.org To: Eugene Podshivalov , pgsql-general@lists.postgresql.org Message-ID: <644001932.1297304.1641622939049@office.mailbox.org> In-Reply-To: References: Subject: Re: Timestamp with precision output format with trailing zeros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Eugene, > > # select '2022-01-06 18:00:00.000+03'::timestamptz(3); > > timestamptz > > ------------------------ > > 2022-01-06 18:00:00+03 > Would it be more correct to output zero milliseconds if the column has > precision defined? Only significant fractional are printed, e.g. with milliseconds > 0: # select '2022-01-06 18:00:00.001+03'::timestamptz(3); timestamptz ---------------------------- 2022-01-06 16:00:00.001+01 I don't know if omitting trailing zeros is intended but it makes sense to me. Erik