Re: Trigger function
От | David G. Johnston |
---|---|
Тема | Re: Trigger function |
Дата | |
Msg-id | CAKFQuwY72k5ngAb+XXwKjBDtqhmqjDXPoAfYGv6AxGXTCsM3NQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Trigger function ("Nicolas Mitchell" <mitchelln@posteo.net>) |
Ответы |
Re: Trigger function
|
Список | pgsql-novice |
On Tue, Jul 27, 2021 at 5:41 PM Nicolas Mitchell <mitchelln@posteo.net> wrote:
If within PG, then
I’d view that as something I should explore. Otherwise, I’m not
keen, at present, to push things into an application when they can be
achieved within PG - this being my own (fairly uneducated) preference.
I'd probably do "CREATE PROCEDURE create_new_host(new_host_name text, new_host_domain integer) ... SECURITY DEFINER"
Then grant permission to call that procedure to roles that need to create new host records. Your original CTE would then be executed within the procedure. Roles would not be given permission to insert directly into the host or related tables - but the owner of the procedure would.
David J.
В списке pgsql-novice по дате отправления: