| От | Tom Lane |
|---|---|
| Тема | Re: Role Permissions |
| Дата | |
| Msg-id | 29427.1136654798@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Role Permissions ("Craig" <postgresql@bryden.co.za>) |
| Список | pgsql-general |
"Craig" <postgresql@bryden.co.za> writes:
> I am trying to prevent anyone that inhertis from role1 to not be able to =
> select from any database table, unless they execute a function that I =
> have provided. How do I setup the security for this?=20
You need to mark the function as SECURITY DEFINER, which means that it
runs with its creator's permissions. By default a function runs with
the caller's permissions.
(Yeah, SECURITY DEFINER is a pretty obscure name for this. It's what
the SQL spec requires though :-()
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера