Re: Revoking the right to create (non-temporary) tables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Hurt <bhurt(at)janestcapital(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Revoking the right to create (non-temporary) tables?
Date: 2007-02-27 16:06:54
Message-ID: 20576.1172592414@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Brian Hurt <bhurt(at)janestcapital(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Neil Aggarwal 2007-02-28 02:50:27 Crappy performance even though not swapping
Previous Message Brian Hurt 2007-02-27 15:26:10 Revoking the right to create (non-temporary) tables?