Re: Inserts restricted to a trigger

Поиск
Список
Период
Сортировка
От raf@raf.org
Тема Re: Inserts restricted to a trigger
Дата
Msg-id 20190618004728.ph5aeg4wlucll7y5@raf.org
обсуждение исходный текст
Ответ на Re: Inserts restricted to a trigger  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Inserts restricted to a trigger  (Miles Elam <miles.elam@productops.com>)
Список pgsql-general
Adrian Klaver wrote:

> On 6/17/19 4:54 PM, Miles Elam wrote:
> > Is there are way to restrict direct access to a table for inserts but
> > allow a trigger on another table to perform an insert for that user?
> > 
> > I'm trying to implement an audit table without allowing user tampering
> > with the audit information.
> 
> Would the below not work?:
> CREATE the table as superuser or other privileged user
> Have trigger function run as above user(use SECURITY DEFINER)

and make sure not to give any other users insert/update/delete
permissions on the audit table.

> > Thanks in advance,
> > 
> > Miles Elam
> 
> -- 
> Adrian Klaver
> adrian.klaver@aklaver.com



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql UPDATE field [tab] expands to DEFAULT?
Следующее
От: Tim Cross
Дата:
Сообщение: Re: psql UPDATE field [tab] expands to DEFAULT?