Search Postgresql Archives

ERROR: permission denied for database control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

I’ve encountered a weird problem in PostgreSQL :

 

postgres=> create user test password ‘test’;

 

postgres=> grant select on pg_catalog.pg_database_size to test;

 

postgres=> grant execute on function pg_catalog.pg_database_size(name) to test;

 

--login as user test

postgres=> select current_user;

current_user

--------------

test

(1 row)

 

 

--query individual database size is fine

postgres=> select pg_database_size('postgres');

pg_database_size

------------------

         25611884

(1 row)

 

--fails if try to get all db size in one sql

postgres=> SELECT current_date,pg_database_size(pg_database.datname) from pg_database;

ERROR:  permission denied for database control

 

Thanks,

Suya


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux