Re: Trigger with current user - Mailing list pgsql-general

From Tom Lane
Subject Re: Trigger with current user
Date
Msg-id 2819.994341831@sss.pgh.pa.us
Whole thread Raw
In response to Trigger with current user  (Nicolas Kowalski <Nicolas.Kowalski@imag.fr>)
List 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 by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: Trigger with current user
Next
From: Tom Lane
Date:
Subject: Re: trigger inheritance