From: ewie@mailbox.org
To: Eugene Podshivalov <yaugenka@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Timestamp with precision output format with trailing zeros
Date: Sat, 8 Jan 2022 07:22:19 +0100 (CET)
Message-ID: <644001932.1297304.1641622939049@office.mailbox.org> (raw)
In-Reply-To: <CAEPw1JUdXkwJjWi4JWE-MWT-mmkpKfmtRLSCSoBCTHdNK-y3qQ@mail.gmail.com>
References: <CAEPw1JUdXkwJjWi4JWE-MWT-mmkpKfmtRLSCSoBCTHdNK-y3qQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ewie@mailbox.org, yaugenka@gmail.com
Subject: Re: Timestamp with precision output format with trailing zeros
In-Reply-To: <644001932.1297304.1641622939049@office.mailbox.org>
References: <CAEPw1JUdXkwJjWi4JWE-MWT-mmkpKfmtRLSCSoBCTHdNK-y3qQ@mail.gmail.com> <644001932.1297304.1641622939049@office.mailbox.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox