From: | dipti shah <shahdipti1980(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Not able to access schema functions and table... |
Date: | 2010-02-19 07:21:47 |
Message-ID: | d5b05a951002182321k102f6d11r7de3bd1f1f9705a1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
Hi,
I have executed below queries.
CREATE SCHEMA mydb_schema AUTHORIZATION postgres;
GRANT ALL ON SCHEMA mydb_schema TO postgres;
REVOKE ALL ON SCHEMA mydb_schema FROM PUBLIC;
REVOKE ALL ON FUNCTION mydb_schema.readtable() FROM PUBLIC;
GRANT EXECUTE ON FUNCTION mydb_schema.readtable() to user1;
GRANT SELECT ON mydb_schema.test1 TO user1;
$ psql -h postgresqlhost.aus -d mydb -U user1
psql (8.4.1)
Type "help" for help.
user1=> select mydb_schema.readtable();
ERROR: permission denied for schema mydb_schema
user1=> select * from mydb_schema.test1;
ERROR: permission denied for mydb_schema
LINE 1: select * from mydb_schema.test1;
^
user1=>
Could anyone please tell me what is wrong here? *I want users to have only
select persions on tables of mydb_schema schema and function readtable
execute permissions for only few users(like above user1).*
Please let me know if there is any alternative way.
Thanks,
Dipti
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian von Bidder | 2010-02-19 08:04:54 | set line number / input file name in psql |
Previous Message | Yan Cheng Cheok | 2010-02-19 05:42:18 | Getting number of affected row after performing update |
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2010-02-19 08:32:51 | Re: Not able to access schema functions and table... |
Previous Message | Greg Sabino Mullane | 2010-02-18 22:10:09 | Re: check_postgres |