"David G. Johnston" <david.g.johns...@gmail.com> writes: > Is this covering the case of executing at the end of an outer SQL command > (thus not deferred) that contains volatile DML functions that temporarily > change current_user within the function?
Not quite. I think that a non-deferred AFTER trigger would ordinarily run as the same user that was active when we queued the event, earlier in the same statement --- but it's possible that some function that runs in between would change the active role in a non-temporary way. Doing that will now have different effects than it did before. regards, tom lane