Re: stable for each row before insert trigger - Mailing list pgsql-general

From Tom Lane
Subject Re: stable for each row before insert trigger
Date
Msg-id 27662.1571382958@sss.pgh.pa.us
Whole thread Raw
In response to stable for each row before insert trigger  (Олег Самойлов <splarv@ya.ru>)
Responses Re: stable for each row before insert trigger
Re: stable for each row before insert trigger
List pgsql-general
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= <splarv@ya.ru> writes:
> According to documentation the words "VOLATILE, STABLE, IMMUTABLE" is somehow useful with trigger functions, for
instancementioned that the AFTER INSERT trigger should be VOLATILE. The question is how this words affect a for each
rowbefore 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



pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Postgres Point in time Recovery (PITR),
Next
From: Luca Ferrari
Date:
Subject: Re: stable for each row before insert trigger