BUG #1221: revoke on schema do not return error on failure

Started by PostgreSQL Bugs Listover 21 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

The following bug has been logged online:

Bug reference: 1221
Logged by: radim kolar

Email address: hsn@netmag.cz

PostgreSQL version: 7.4.1

Operating system: freebsd

Description: revoke on schema do not return error on failure

Details:

Problem 1
pgsql 7.4.1

revoke create on schema do not issues an error when user has no access
privileges to do that.

dbmail=> REVOKE CREATE ON SCHEMA public FROM PUBLIC;
REVOKE
Grant works as expected
dbmail=> GRANT USAGE on SCHEMA public to public;
ERROR: permission denied for schema public

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: BUG #1221: revoke on schema do not return error on failure

"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:

revoke create on schema do not issues an error when user has no access
privileges to do that.

dbmail=> REVOKE CREATE ON SCHEMA public FROM PUBLIC;
REVOKE
Grant works as expected
dbmail=> GRANT USAGE on SCHEMA public to public;
ERROR: permission denied for schema public

In 8.0 both of these cases will return WARNINGs (not errors). This is
per our current reading of the SQL specification.

regards, tom lane