Re: Restrict allowed database names?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Restrict allowed database names?
Date: 2010-03-21 18:02:33
Message-ID: 24819.1269194553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Daniel Verite" <daniel(at)manitou-mail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John Shott 2010-03-21 19:20:51 Problems with "CREATE CAST"
Previous Message Sergey Konoplev 2010-03-21 17:56:13 Re: Restrict allowed database names?