In PostgreSQL, timeofday()
is a non-SQL-standard time function that returns the current date and time, with the time zone abbreviation.
It’s similar to the clock_timestamp()
function, except that it returns its result as a formatted text
string rather than a timestamp with time zone
value.
The result of both functions changes throughout the execution of a statement. Therefore, you could get a different result in different parts of the statement if you call the functions multiple times within a single statement.
Continue reading