=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= <splarv@xxxxx> writes: > According to documentation the words "VOLATILE, STABLE, IMMUTABLE" is somehow useful with trigger functions, for instance mentioned that the AFTER INSERT trigger should be VOLATILE. The question is how this words affect a for each row before insert trigger? Can be some optimisation here? Where did you read that? There's no optimization that considers the volatility of trigger functions --- they'll be called exactly when specified, no more or less. There are some PLs that might behave differently depending on whether they think the function is volatile or not, but that's independent of whether the function is a trigger. regards, tom lane