Comment by drdaeman
12 hours ago
SQL functions can be non-deterministic just fine. E.g. SQL:2003 grammar defines DETERMINISTIC | NOT DETERMINISTIC characteristic for CREATE FUNCTION. Or, e.g. PostgreSQL has IMMUTABLE | STABLE | VOLATILE clauses.
12 hours ago
SQL functions can be non-deterministic just fine. E.g. SQL:2003 grammar defines DETERMINISTIC | NOT DETERMINISTIC characteristic for CREATE FUNCTION. Or, e.g. PostgreSQL has IMMUTABLE | STABLE | VOLATILE clauses.
That's how something like `clock_timestamp()` can be supported. It returns the timestamp at time of execution, so it can change even within the same query if called multiple times: https://www.postgresql.org/docs/current/functions-datetime.h...
Nice, TIL. Thanks!