| From: | Nick Guenther <nguenthe(at)uwaterloo(dot)ca> | 
|---|---|
| To: | cowwoc <cowwoc(at)bbs(dot)darktech(dot)org>, pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Feature request: temporary schemas | 
| Date: | 2014-09-14 22:07:07 | 
| Message-ID: | 3cb0b089-58a5-438f-84b3-ebdb10215dbe@email.android.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On September 14, 2014 6:01:15 PM EDT, cowwoc <cowwoc(at)bbs(dot)darktech(dot)org> wrote:
>
>On 14/09/2014 5:52 PM, Nick Guenther [via PostgreSQL] wrote:
>>
>>
>> On September 14, 2014 5:01:54 PM EDT, cowwoc <[hidden email] 
>> </user/SendEmail.jtp?type=node&node=5819003&i=0>> wrote:
>> >Hi,
>> >
>> >I'd like to propose the ability to create temporary schemas.
>> >
>> >This would facilitate running unit tests, where developers would
>like
>> >to run
>> >the same creation script for unit tests and production code but do
>not
>>
>> What if you ran a temporary database instead? You can use some 
>> combination of PGHOST, PGPORT, PGUSER and PGDATABASE to "pg_ctl
>start" 
>> an empty DB and then point your unit tests at it.  Then you aren't in
>
>> danger of wiping out your production DB either.
>>
>>
>Hi Nick,
>
>I don't think this would help for three reasons:
>
> 1. I'm already planning to run unit tests against a separate (but
>    identical) database than production, so there's no danger of wiping
>    out the production database.
> 2. I need to create a new temporary schema per test, and run 4-10 of
>    tests per second. I'm guessing this wouldn't perform well using
>    "pg_ctl".
> 3. And finally, I'd like to configure all this through JDBC (pure
>    Java). "pg_ctl" would require me to interact with native code.
Well, forget pg_ctl then. Can you use DROP DATABASE instead?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2014-09-15 00:34:42 | Re: Feature request: temporary schemas | 
| Previous Message | cowwoc | 2014-09-14 22:01:15 | Re: Feature request: temporary schemas |