pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jerry Sievers <gsievers19@comcast.net>
To: Keith <keith@keithf4.com>
Cc: Don Seiler <don@seiler.us>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: CREATE ANY TABLE privileges, etc
Date: Tue, 15 Aug 2017 14:50:12 -0500
Message-ID: <878tik4nm3.fsf@jsievers.enova.com> (raw)
In-Reply-To: <CAHw75vtbmfK+DGHpd4-pLe4kqU7huwT=Puw1gHDgTNO1JAfoEA@mail.gmail.com>
References: <CAHJZqBCXtbFz2BByVG4GHaOCfVVNzQzH2Y-11=njxyeVKniuKQ@mail.gmail.com>
	<CAHw75vtbmfK+DGHpd4-pLe4kqU7huwT=Puw1gHDgTNO1JAfoEA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Keith <keith@keithf4.com> writes:

> On Tue, Aug 15, 2017 at 9:15 AM, Don Seiler <don@seiler.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.consulting@comcast.net
p: 312.241.7800


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (4+ messages)

Message-ID: <878tik4nm3.fsf@jsievers.enova.com>
Permalink:  ../878tik4nm3.fsf@jsievers.enova.com/
Also on:    postgresql.org/message-id/878tik4nm3.fsf@jsievers.enova.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gsievers19@comcast.net, keith@keithf4.com, don@seiler.us
  Subject: Re: CREATE ANY TABLE privileges, etc
  In-Reply-To: <878tik4nm3.fsf@jsievers.enova.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox