pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Chris Withers <chris@withers.org>
To: pgsql-general@lists.postgresql.org
Subject: Re: granting right to create and delete just one database
Date: Wed, 05 Jun 2019 17:00:37 +0200
Message-ID: <d6e35f82ffbb0129462aed594ee6286bf28c0125.camel@cybertec.at> (raw)
In-Reply-To: <176edf88-10e2-6838-64c0-d9b945367ba4@withers.org>
References: <32b82200-576e-d51a-f16c-541068896762@withers.org>
	<91b121d8f4f2e4a7b85e46f87cf91f634598c88d.camel@cybertec.at>
	<176edf88-10e2-6838-64c0-d9b945367ba4@withers.org>

Chris Withers wrote:
> > > Is there any way to grant rights to a user such that they can drop and
> > > re-create only a single database?
> > No; what I'd do if I needed that is to create a SECURITY DEFINER function
> > that is owned by a user with the CREATEDB privilege.
>
> Thanks, that's a great idea! Is this pattern documented anywhere as a 
> complete finished thing?

I'm afraid that is left as an exercise to the reader.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (4+ messages)

Message-ID: <d6e35f82ffbb0129462aed594ee6286bf28c0125.camel@cybertec.at>
Permalink:  ../d6e35f82ffbb0129462aed594ee6286bf28c0125.camel@cybertec.at/
Also on:    postgresql.org/message-id/d6e35f82ffbb0129462aed594ee6286bf28c0125.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, chris@withers.org
  Subject: Re: granting right to create and delete just one database
  In-Reply-To: <d6e35f82ffbb0129462aed594ee6286bf28c0125.camel@cybertec.at>
  References: <32b82200-576e-d51a-f16c-541068896762@withers.org> <91b121d8f4f2e4a7b85e46f87cf91f634598c88d.camel@cybertec.at> <176edf88-10e2-6838-64c0-d9b945367ba4@withers.org> <d6e35f82ffbb0129462aed594ee6286bf28c0125.camel@cybertec.at>

* 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