Search Postgresql Archives

Re: Timestamp with precision output format with trailing zeros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux