Will multiple calls to `now()` in a single postgres query always give same result?
The documentation says about now()
:
now() is a traditional PostgreSQL equivalent to transaction_timestamp()
And about transaction_timestamp()
:
These SQL-standard functions all return values based on the start time of the current transaction
So within one SQL statement, now()
will always return the same value.