Re: create create of database of a particular name - Mailing list pgsql-general

From Adrian Klaver
Subject Re: create create of database of a particular name
Date
Msg-id 56E038EE.8040403@aklaver.com
Whole thread Raw
In response to create create of database of a particular name  (Chris Withers <chris@simplistix.co.uk>)
Responses Re: create create of database of a particular name  (Chris Withers <chris@simplistix.co.uk>)
List pgsql-general
On 03/09/2016 05:49 AM, Chris Withers wrote:
> Hi All,
>
> Django, a popular python web framework, runs its unit tests by creating
> a 'test_'-prefixed database and then dropping it at the end of the test
> run.

FYI in Django 1.8+ you can prevent that:

https://docs.djangoproject.com/en/1.8/topics/testing/overview/#the-test-database

" New in Django 1.8:

You can prevent the test databases from being destroyed by adding the
--keepdb flag to the test command. This will preserve the test database
between runs. If the database does not exist, it will first be created.
Any migrations will also be applied in order to keep it up to date.
"
>
> Is there any way I can grant a user in postgres the ability only to
> create a database of a particular name?

Not that I know of.

>
> cheers,
>
> Chris
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Wyatt Sanford
Date:
Subject: How to setup Active Directory users in Postgres 9.3.11
Next
From: Chris Withers
Date:
Subject: Re: create create of database of a particular name