Re: Restrict allowed database names?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Daniel Verite" <daniel@manitou-mail.org>
Cc: pgsql-general@postgresql.org
Date: 2010-03-21T18:02:33Z
Lists: pgsql-general
"Daniel Verite" <daniel@manitou-mail.org> writes:
> 	Sergey Konoplev wrote:
>> What about PL/pgSQL wrapper function for CREATE DATABASE with database
>> name check and SECURITY DEFINER option. 

> Not possible because CREATE DATABASE can't be executed within a function (nor
> within a transaction).

Note that the reasons why that's true are equally good reasons to not
allow triggers or any other user-added operations for CREATE DATABASE.

			regards, tom lane