Re: Restrict user to create only one db with a specific name

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tiffany Thang <tiffanythang(at)gmail(dot)com>
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Restrict user to create only one db with a specific name
Date: 2020-03-07 06:00:51
Message-ID: CAKFQuwZ-dQo9fhSc3-uOqL4_rvYBKN+nb6JMa7BzZPYRxU6YiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, March 6, 2020, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:

> On Fri, Mar 6, 2020 at 4:28 PM Tiffany Thang <tiffanythang(at)gmail(dot)com>
> wrote:
>
>> Hi,
>> Is there a way in PostgreSQL 12 to restrict user to creating a database
>> with a specific database name?
>>
>>

>
>> You could just have them log into an admin database and run a function
>> that creates the database for them using function owner privileges then you
>> can add whatever special logic you want to that function.
>>
>
Or not...the transaction involved with executing a function causes create
database to not work...

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2020-03-07 07:35:22 Re: Restrict user to create only one db with a specific name
Previous Message David G. Johnston 2020-03-06 23:39:14 Re: Restrict user to create only one db with a specific name