Re: Problem with delete trigger: how to allow only triggers to delete a row?
От | Alvaro Herrera |
---|---|
Тема | Re: Problem with delete trigger: how to allow only triggers to delete a row? |
Дата | |
Msg-id | 20081010180525.GC4194@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: Problem with delete trigger: how to allow only triggers to delete a row? ("Christopher Maier" <maier@med.unc.edu>) |
Ответы |
Re: Problem with delete trigger: how to allow only
triggers to delete a row?
Re: Problem with delete trigger: how to allow only triggers to delete a row? |
Список | pgsql-sql |
Christopher Maier wrote: > However, I need to restrict deletion based on, for lack of a better > term, "where" the DELETE command comes from. I do not want someone > sitting at a psql console to be able to type: > > DELETE FROM my_table WHERE deduced IS TRUE; Looks like you should revoke DELETE privilege from plain users, and have your delete trigger be a security definer function. There would be another security definer function to delete non-deduced rows which users can call directly. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-sql по дате отправления: