Restrict allowed database names?

From: Adam Seering <aseering(at)MIT(dot)EDU>
To: pgsql-general(at)postgresql(dot)org
Subject: Restrict allowed database names?
Date: 2010-03-20 21:24:30
Message-ID: F84CC8A4-0BBE-409D-B1DD-13C50D4515EA@mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I'm trying to set up an internal general-purpose PostgreSQL server installation. I want most users with login access to the server to be able to create databases, but only with names that follow a specified naming convention (in particular, approximately "is prefixed with the owner's username"). A subset of administrative users can create users with any name. The goal is to let users create arbitrary databases, but to force them to get approval for names that someone else (or some other service) might conceivably want.

Is there any way to enforce this within PostgreSQL? Maybe something like a trigger on CREATE DATABASE, if that's possible?

Thanks,
Adam

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Seering 2010-03-20 21:50:47 Restrict allowed database names?
Previous Message Scott Marlowe 2010-03-20 18:31:14 Re: stopping processes, preventing connections