Kirk Parker <k...@equatoria.us> writes: > On Fri, Oct 13, 2023 at 7:32 AM David G. Johnston < > david.g.johns...@gmail.com> wrote: >> That is precisely what a no default with maximum of six means. If we say >> the default is six that would imply storage of less precise values pads >> significant zeros until there are six.
> Not sure that last statement is correct. In 13 (only system I have access > to at the moment) it doesn't look like casting to a precision greater than > the value originally had causes any padding: The timestamp types don't have any explicit notion of precision (unlike, say, numeric). The stored value is an integer number of microseconds, nothing else. I've not checked the output function recently but it makes sense to me that it'd just drop trailing zeroes from the display, independently of any claimed precision for the column. Meanwhile, when casting a timestamp value to a declared precision, we handle that by just rounding off the microseconds count. This doesn't buy any space savings or anything like that, it's just for pro-forma compliance with the spec. I don't see anything particularly wrong with the existing docs. The limitation to 1-microsecond precision is spelled out in the table just above the para you quote. regards, tom lane