2

Reading this post, the author references a "non-volatile" expression, after researching a bit, I'm still not sure what it is. What is meant by a non-volatile expression in Postgresql?

1
  • 1
    A trip to the docco might be helpful.
    – Vérace
    Dec 16, 2021 at 8:16

1 Answer 1

4

"Immutable" expressions resolve to the same value always. Like 2 + 3.

"Stable" expressions resolve to the same value within a single table scan. Like: now().

"Volatile" expressions can resolve to a different value for each evaluation. Like: clock_timestamp().

"Non-volatile" would be in one of the first two categories.

Related:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.