Access denied on trigger UPDATE even with UPDATE perms

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Access denied on trigger UPDATE even with UPDATE perms
Date: 2021-03-05 20:59:51
Message-ID: CAOC+FBVFtdBJAO0L8As3zNWq0-rJ5h8hS_MohDfhHfaxCNF-KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

A role has UPDATE on table A.

There's a trigger on table B which updates A.

The user can insert into B, but the trigger to update A fails:

CONTEXT: SQL statement "UPDATE A SET c = NEW.c WHERE id = NEW.id"
PL/pgSQL function schema.tg_function() line 3 at SQL statement

What additional perms are needed so the user inserting into B (which they
have permission for) can successfully update A via that trigger?

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2021-03-05 21:41:20 User has role, role has UPDATE, user can't update, cannot figure this out.
Previous Message Holger Jakobs 2021-03-05 08:59:34 Re: could not load library "$libdir/plpython2" while upgrading from postgresql-10 to 12