Re: BUG #13318: refresh materilaized view privileges

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: BUG #13318: refresh materilaized view privileges
Дата
Msg-id 555BBB96.2000506@hogranch.com
обсуждение исходный текст
Ответ на BUG #13318: refresh materilaized view privileges  (Adrien.Sales@gmail.com)
Список pgsql-bugs
On 5/19/2015 2:07 PM, Adrien.Sales@gmail.com wrote:
> CREATE OR REPLACE FUNCTION refresh_astre()
> RETURNS void
> SECURITY DEFINER    -- <== added this
> AS $$
> BEGIN
> REFRESH MATERIALIZED VIEW vm_titi with data;
> RETURN;
> END;
> $$ LANGUAGE plpgsql;
>
> select refresh_astre();
>
> grant execute on function refresh_astre() to user_usr;
>
> psql -U user_usr test
>
> test=> select refresh_astre();
> ...

try again, with SECURITY DEFINER in the function declaration.   This
says when this function is run, it runs with the permissions of the
function owner, rather than the caller.

.

--
john r pierce, recycling bits in santa cruz

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

Предыдущее
От: Adrien.Sales@gmail.com
Дата:
Сообщение: BUG #13318: refresh materilaized view privileges
Следующее
От: sathhish@hotmail.com
Дата:
Сообщение: BUG #13321: SQL SHELL(psql)