PostgreSQL allows time
/timestamp
to specify a precision:
time
,timestamp
, andinterval
accept an optional precision valuep
which specifies the number of fractional digits retained in the seconds field. By default, there is no explicit bound on precision. The allowed range ofp
is from 0 to 6.
From PostgreSQL 13 Documentation
However it states that storage space is a constant 8-bytes for (timestamp
and time without timezone
) and 12-bytes for time with timezone
regardless of p
.
In the case that one doesn't need extra precision — say milliseconds(p = 3
) or seconds(p=0
) would suffice — is there an advantage to explicitly lowering the precision?