You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
postgres stores timestamps in microsecond precision. When a timestamp value comes back through node-postgres, it gets mapped to a javascript Date object with millisecond precision. I have a scenario now where i need to see the exact value. is there a way to do this?
Background:
i have a trigger that sets the updated_at timestamp on any row update
I'd like to use this for optimistic concurrency control across long operations, by checking if the row updated_at timestamp is still at the last value i read, or if someone else updated the row in the intervening time
Alternatively, have folks solved this using version numbers instead of timestamps, or some other scheme? I want the version/timestamping to be database enforced, not client-code enforced, for robustness.
Thanks.
The text was updated successfully, but these errors were encountered:
@freewil & @brianc, it seems that types.js has been removed. I can't even get milliseconds shown now. It also doesn't round; it only truncates it, which is not correct anyways.
postgres stores timestamps in microsecond precision. When a timestamp value comes back through node-postgres, it gets mapped to a javascript Date object with millisecond precision. I have a scenario now where i need to see the exact value. is there a way to do this?
Background:
Alternatively, have folks solved this using version numbers instead of timestamps, or some other scheme? I want the version/timestamping to be database enforced, not client-code enforced, for robustness.
Thanks.
The text was updated successfully, but these errors were encountered: