Обсуждение: plpgsql cant to set role from function. is bug?

Поиск
Список
Период
Сортировка

plpgsql cant to set role from function. is bug?

От
"Pavel Stehule"
Дата:
Hello

This code run without error, but do nothing

drop role x;
create role x;
create or replace function foo() returns void as $$
begin grant root to x;
end;
$$ language plpgsql;
\dg x
revoke root from x;

postgres=# postgres=# DROP ROLE
postgres=# CREATE ROLE
postgres=# postgres$# postgres$# postgres$# postgres$# CREATE FUNCTION
postgres=#                                List of roles
Role name | Superuser | Create role | Create DB | Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
x         | no        | no          | no        | no limit    |
(1 row)

postgres=# WARNING:  role "x" is not a member of role "root"
REVOKE ROLE
postgres=#

what is wrong?
Regards
Pavel Stehule

p.s. root is postgresql superuser

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/