Re: CREATE ANY TABLE privileges, etc

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: Keith <keith(at)keithf4(dot)com>
Cc: Don Seiler <don(at)seiler(dot)us>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: CREATE ANY TABLE privileges, etc
Date: 2017-08-15 19:50:12
Message-ID: 878tik4nm3.fsf@jsievers.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Keith <keith(at)keithf4(dot)com> writes:

> On Tue, Aug 15, 2017 at 9:15 AM, Don Seiler <don(at)seiler(dot)us> wrote:
>
> Good morning,
>
> I've had a request to create a user that can create tables and
> schemas anywhere in this dev database. I know I could just make
> that user a SUPERUSER but wondering if there's anything short of
> that that seems more responsible. Again, this would only be in
> DEV so I'm not nearly as concerned giving them a superuser,
> assuming they haven't shown a track record of reckless behavior.
>
> I'm thinking of privileges like Oracle's CREATE ANY TABLE, etc.
> vs granting them the DBA role.
>
> Don.
>
> --
> Don Seiler
> www.seiler.us
>
>
> Easiest thing would be to grant ownership of that database to the
> user. That won't grant privileges to any existing objects, but will
> allow new schemas to be made by that user, which will in turn allow
> objects to be made in those schema that user creates.

Hmmm?

Often DB objects will be owned by whichever owner role...

Thus, granting that role to some other user does indeed give that user
full access to same objects as per whatever grants are established on
them to the owner.

By default, owner has all privileges but this can be changed.

HTH

> Otherwise, there is the GRANT CREATE ON DATABASE ... command which
> will essentially do the same thing and allow schemas to be created.
>
> https://www.postgresql.org/docs/9.6/static/sql-grant.html
>
> Keith
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Don Seiler 2017-08-15 21:49:29 Stats Disappear After Minor Upgrade?
Previous Message Phil Frost 2017-08-15 14:56:27 Re: avoiding split brain with repmgr