Re: DML Restriction unless through a function

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: DML Restriction unless through a function
Дата
Msg-id
9630.1088611244@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
DML Restriction unless through a function val@webtribe.net
Re: DML Restriction unless through a function Bruno Wolff III <bruno@wolff.to>
Re: DML Restriction unless through a function Adam Witney <awitney@sghms.ac.uk>
Re: DML Restriction unless through a function Bruno Wolff III <bruno@wolff.to>
Re: DML Restriction unless through a function Tom Lane <tgl@sss.pgh.pa.us>
Re: DML Restriction unless through a function Bruno Wolff III <bruno@wolff.to>
Re: DML Restriction unless through a function Shridhar Daithankar <shridhar@frodo.hserus.net>
Bruno Wolff III  writes:
>> Out of interest, what are the issues?

> You should be able to find a more accurate description in the archives, but
> my memory is that when you run a security definer function in a view
> (this shouldn't apply if it is used as a default for a column in the view) it
> runs with the authority of the view creator ran than the function creator.

That doesn't sound right to me at all.  A SECURITY DEFINER function is
self contained --- if we ever failed to execute it as the owning user,
that would be a bug, and I'd be pleased to see an example.

I do recall that if you have a function that is *not* SECURITY DEFINER,
and you use it in a view, it will be invoked as the current user, not as
the view creator which is what some people expect.  It's fairly easy to
get around this using SECURITY DEFINER, so it's unlikely that we'll
change it ...

			regards, tom lane
В списке pgsql-general по дате отправления
От: Dennis Gearon
Дата:
Сообщение: backups
От: Tom Lane
Дата:
FAQ