Re: Trigger with current user

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trigger with current user
Дата
Msg-id 2819.994341831@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trigger with current user  (Nicolas Kowalski <Nicolas.Kowalski@imag.fr>)
Список pgsql-general
Nicolas Kowalski <Nicolas.Kowalski@imag.fr> writes:
> - if the current user is declared as one of the lists maintainers
> ("SELECT maintainer FROM sys_mailing_lists;"), he(she) will be able to
> SELECT, INSERT, UPDATE & DELETE rows in the 'sys_mailing_members' table,
> - if not he(she) will only be able to do SELECT's on
> 'sys_mailing_members'.

Why do you need to build this from spare parts?  Use GRANT.  Possibly
create a GROUP to list the maintainers (makes life easier if the same
set of users should have similar permissions on multiple tables).

            regards, tom lane

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

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: Trigger with current user
Следующее
От: Tom Lane
Дата:
Сообщение: Re: trigger inheritance