Re: granting right to create and delete just one database

2019-06-05 Thread Laurenz Albe
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

Re: granting right to create and delete just one database

2019-06-05 Thread Chris Withers
On 05/06/2019 09:52, Laurenz Albe wrote: 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. T

Re: granting right to create and delete just one database

2019-06-05 Thread Laurenz Albe
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. This function can be called by a normal

granting right to create and delete just one database

2019-06-04 Thread Chris Withers
Hi All, Is there any way to grant rights to a user such that they can drop and re-create only a single database? cheers, Chris