Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11, 5.15.1, 5.15.2
-
None
-
Debian GNU/Linux, both 10 and current unstable.
Description
Postgres' timestamptz has a definition of microseconds. QDateTime::toString(Qt::IsoDateWithMs) the number of milliseconds does not fully represents timestamp/timestamptz in postgres. For example I (used to have) a stored procedure that created a value with clock_timestamp(). This value was used as a time reference by Qt, but it missed the microseconds part, so the data was not exactly the same.
To hack around this I used current_timestamp(3) (which is not exactly the same as clock_timestamp() but still useful in my case) limiting the precision used within postgres.
Ideally the data should be represented without loosing precision or, at very least, warn the user in the documentation that this might happen.