Aw: Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario - Mailing list pgsql-general

From Karsten Hilbert
Subject Aw: Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario
Date
Msg-id trinity-41237384-5ec3-4343-8b77-937db0da5571-1660205456685@3c-app-gmx-bs36
Whole thread Raw
In response to Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario  (Bryn Llewellyn <bryn@yugabyte.com>)
Responses Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario
List pgsql-general
I'll be happy to make a smaller example. It will, however, need to create users, a database, schemas, and some number
oftriggers. 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
changesthat 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
ofthe 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
 



pgsql-general by date:

Previous
From: Laura Smith
Date:
Subject: Modelling a web CMS in Postgres ... a little advice needed
Next
From: Tony Shelver
Date:
Subject: Fwd: Modelling a web CMS in Postgres ... a little advice needed