"=?ISO-8859-1?Q?William_Leite_Ara=FAjo?=" <william(dot)bh(at)gmail(dot)com> writes:
> I need this to give a credit from canceled billets.
> But anyone instead of roots can insert on this table.
> If it's done by a function, only roots must run it. So, the trigger
> will fail because is runned a no "su"...
You need to read up on SECURITY DEFINER functions.
regards, tom lane