Aw: Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Aw: Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario
Date: 2022-08-11 08:10:56
Message-ID: trinity-41237384-5ec3-4343-8b77-937db0da5571-1660205456685@3c-app-gmx-bs36
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'll be happy to make a smaller example. It will, however, need to create users, a database, schemas, and some number of triggers. Because the triggers, their functions, and everything else about them follow a pattern, I can use "format()" and dynamic SQL to generate them. I'll still need those three "security definer" procedures to make the table changes that I explained. And the code to call these procedures to implement the test. So the result won't be exactly small. But, while I'm generating the triggers, I may just as well generate all eight. After all, how would I know which of the eight to skip while I don't know the intended rules for the current_role?

= You'd certainly start out with all eight but then whittle down to what still exhibits the problem and post that.
= Karsten
 

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tony Shelver 2022-08-11 09:49:31 Fwd: Modelling a web CMS in Postgres ... a little advice needed
Previous Message Laura Smith 2022-08-11 07:35:22 Modelling a web CMS in Postgres ... a little advice needed