News for hackers. Stuff that matters.
Re:All the ways to capture changes in Postgres by sbuttgereit on Friday September 22, 2023 @07:20PM (#37619047)
There is a way in PostgreSQL to get actual wall clock time of the database server: `clock_timestamp()` regardless of transaction start time.

There's also `statement_timestamp()` per the docs: "returns the start time of the current statement (more specifically, the time of receipt of the latest command message from the client)."

https://www.postgresql.org/docs/current/functions-datetime.h...

This isn't to say any of these methods are the best (or even good) in all cases. Time is tricky, especially if you're trying to do any sort of sequencing.

There are no comments on this comment yet.