Re: User with GRANTS only on Views. Lock table on function will work?

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: User with GRANTS only on Views. Lock table on function will work?
Дата
Msg-id 4BD457C1.40503@iol.ie
обсуждение исходный текст
Ответ на User with GRANTS only on Views. Lock table on function will work?  (Andre Lopes <lopes80andre@gmail.com>)
Список pgsql-general
On 25/04/2010 13:24, Andre Lopes wrote:
> Hi,
>
> I have a database were the users only can do operations using views,
> they have not access to physical tables. But I have a function with a
> lock on a physical table. Can I allow this users to run a function that
> locks a physical table?

You can create a function with SECURITY DEFINER, allowing it to be run
with the privileges of the users who created it rather than the user who
is running it. See here:

  http://www.postgresql.org/docs/8.4/static/sql-createfunction.html

Would this do what you need?

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

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

Предыдущее
От: Megha
Дата:
Сообщение: debug pgpool
Следующее
От: "dario.ber@libero.it"
Дата:
Сообщение: R: Catch exception from plpy