Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

plpgsql cant to set role from function. is bug?



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/




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group