What the planner may assume about a function.
The two families are not interchangeable: MySQL and MariaDB take DETERMINISTIC / NOT DETERMINISTIC, the PostgreSQL family takes IMMUTABLE / STABLE / VOLATILE. Naming them here means picking the wrong one for a dialect is visible at the call site.
DETERMINISTIC
NOT DETERMINISTIC
IMMUTABLE
STABLE
VOLATILE
Same arguments always give the same result; required to index a call.
Constant within one statement. PostgreSQL family.
May do anything. The default. PostgreSQL family.
MySQL / MariaDB spelling of immutable.
MySQL / MariaDB spelling of volatile.
What the planner may assume about a function.
The two families are not interchangeable: MySQL and MariaDB take
DETERMINISTIC/NOT DETERMINISTIC, the PostgreSQL family takesIMMUTABLE/STABLE/VOLATILE. Naming them here means picking the wrong one for a dialect is visible at the call site.