Restrict allowed database names?

From: Adam Seering <aseering(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Restrict allowed database names?
Date: 2010-03-20 21:50:47
Message-ID: 074EBDFF-4AA2-41AF-BA76-18883A66E9BB@gmail.com
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

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 2010-03-20 21:57:53 Re: stopping processes, preventing connections
Previous Message Adam Seering 2010-03-20 21:24:30 Restrict allowed database names?