Re: Data access and user id
От | Richard Broersma |
---|---|
Тема | Re: Data access and user id |
Дата | |
Msg-id | 396486430911210824m79a52999s37fb773f75335581@mail.gmail.com обсуждение исходный текст |
Ответ на | Data access and user id ("Jean-Yves F. Barbier" <12ukwn@gmail.com>) |
Ответы |
Re: Data access and user id
Re: Data access and user id |
Список | pgsql-novice |
On Sat, Nov 21, 2009 at 8:08 AM, Jean-Yves F. Barbier <12ukwn@gmail.com> wrote: > My PB is I just can use triggers with SECURITY DEFINER to do that, thus > I can't update the field 'user_mod' with user's id because triggers are > always executed as their owner's id, not caller's id. http://www.postgresql.org/docs/8.4/interactive/functions-info.html Notice that there are different user operators to choose from. current_user ( user ), session_user. I believe that one of those will give you what you want. -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug
В списке pgsql-novice по дате отправления: