Ability to create tables - Mailing list pgsql-general

From Ron Johnson
Subject Ability to create tables
Date
Msg-id 2b6740bf-cab4-6ddf-2928-665d632efb41@cox.net
Whole thread Raw
Responses Re: Ability to create tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

Archaic v9.2.7

Even though I revoked the  CREATE priv on role ABCREADONLY, it's still able 
to create tables.  What can I do to prevent this?

\c postgres
CREATE ROLE "ABCREADONLY" LOGIN INHERIT PASSWORD 'Flying.Fox';
GRANT CONNECT ON DATABASE "ABC123" TO "ABCREADONLY";

\c ABC123
GRANT USAGE ON SCHEMA public, ABC, tms TO "ABCREADONLY";
GRANT SELECT ON ALL TABLES IN SCHEMA public, ABC, tms TO "ABCREADONLY";
ALTER DEFAULT PRIVILEGES IN SCHEMA public, ABC, tms GRANT SELECT ON TABLES 
TO "ABCREADONLY";

$ psql -c 'revoke create on database "ABC123" from "ABCREADONLY";'
REVOKE
$ psql -d ABC123 -U ABCREADONLY -c "create table bar (f1 integer);"
CREATE TABLE
$ psql -d ABC123 -U ABCREADONLY -c "\d bar"
       Table "public.bar"
Column |  Type   | Modifiers
--------+---------+-----------
f1     | integer |

Thanks

-- 
Angular momentum makes the world go 'round.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: how to get list of sequences owned by a user/role
Next
From: Tom Lane
Date:
Subject: Re: Ability to create tables