Re: Revoking the right to create (non-temporary) tables? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Revoking the right to create (non-temporary) tables?
Date
Msg-id 20576.1172592414@sss.pgh.pa.us
Whole thread Raw
In response to Revoking the right to create (non-temporary) tables?  (Brian Hurt <bhurt@janestcapital.com>)
List pgsql-novice
Brian Hurt <bhurt@janestcapital.com> writes:
> Is there a way to revoke the right of a given user from creating
> tables?  By preference I'd restrict only creating non-temporary tables.

> I've tried both
> REVOKE CREATE ON DATABASE dbase FROM user;
> and:
> REVOKE CREATE ON SCHEMA public FROM user;

> neither of these seem to work.  Help?

What you missed is that you have to revoke those two rights from PUBLIC,
else the user still has 'em via his implicit membership in PUBLIC.  The
REVOKEs you gave were no-ops, because there was no explicit GRANT to
that particular user for them to undo.  The only GRANTs that are in the
permissions structure by default are to PUBLIC ...

            regards, tom lane

pgsql-novice by date:

Previous
From: Brian Hurt
Date:
Subject: Revoking the right to create (non-temporary) tables?
Next
From: "Neil Aggarwal"
Date:
Subject: Crappy performance even though not swapping