Rafal Pietrak <rafal@xxxxxxxxxxxxxxxxxx> writes: > I thought trigger functions execute at root/postgres security level? No. You probably want to make that function SECURITY DEFINER so it executes as the owner, but this isn't default for triggers. regards, tom lane