public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nicolas Mitchell <[email protected]>
To: David G. Johnston <[email protected]>
Cc: hubert depesz lubaczewski <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: Re: Trigger function
Date: Wed, 28 Jul 2021 00:49:48 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwY72k5ngAb+XXwKjBDtqhmqjDXPoAfYGv6AxGXTCsM3NQ@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<CAKFQuwazmQBDYdt+zcw2WV+3bONRjbe7qoHiMnREYj+VRXEXjA@mail.gmail.com>
<[email protected]>
<CAKFQuwY-1SH+2aGbceazDw+MvrBLC1raD951vBA7LivE2QmNzQ@mail.gmail.com>
<[email protected]>
<CAKFQuwY72k5ngAb+XXwKjBDtqhmqjDXPoAfYGv6AxGXTCsM3NQ@mail.gmail.com>
On 28 Jul 2021, at 1:46, David G. Johnston wrote:
> 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.
>
Okay, that’s something I can get my teeth into.
Many thanks,
Nic
view thread (11+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Trigger function
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox