Re: [GENERAL] Feature request: temporary schemas

2014-09-22 Thread Pete Hollobon
On 14 September 2014 22:01, cowwoc wrote: > Hi, > > I'd like to propose the ability to create temporary schemas. > > Unlike temporary tables, this feature would enable developers to create a > temporary schema once and execute CREATE TABLE statements without the > TEMPORARY parameter. > I think

Re: [GENERAL] Feature request: temporary schemas

2014-09-17 Thread cowwoc
Hi guys, I wanted to update you on this topic. Pete provided an excellent answer at http://dba.stackexchange.com/a/76661/4719 that almost worked (we couldn't find a solution for functions) but it turns out that my original problem definition was incorrect. I assumed that my unit tests only use on

Re: [GENERAL] Feature request: temporary schemas

2014-09-16 Thread Pete Hollobon
On 14 September 2014 22:01, cowwoc wrote: > Hi, > > I'd like to propose the ability to create temporary schemas. > > Unlike temporary tables, this feature would enable developers to create a > temporary schema once and execute CREATE TABLE statements without the > TEMPORARY parameter. > > > I thi

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Adrian Klaver
On 09/15/2014 08:05 AM, cowwoc wrote: On 15/09/2014 10:37 AM, Adrian Klaver wrote: From your second post: " 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 cr

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread cowwoc
On 15/09/2014 10:37 AM, Adrian Klaver wrote: From your second post: " 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, a

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Adrian Klaver
On 09/15/2014 07:08 AM, cowwoc wrote: On 15/09/2014 9:39 AM, Adrian Klaver wrote: Not exactly. Each test is responsible for populating its own schema (creating tables, inserting data). The main purpose of using temporary schemas is to ensure that each test runs in isolation so that data from ot

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Rob Sargent
Interesting enough concept. Please don't forget to test against a realistic data set as well. It does seem to me that the devs can easily make, fill, clean up their own db. And a central builder (eg Jenkins?) can do the same with, importantly using ALL tests. Then again using real data. > On

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread cowwoc
On 15/09/2014 9:39 AM, Adrian Klaver wrote: Not exactly. Each test is responsible for populating its own schema (creating tables, inserting data). The main purpose of using temporary schemas is to ensure that each test runs in isolation so that data from other tests cannot influence the outcome

Re: [GENERAL] Feature request: temporary schemas

2014-09-15 Thread Adrian Klaver
On 09/14/2014 08:21 PM, cowwoc wrote: Hi Adrian, Replies below. On 14/09/2014 8:34 PM, Adrian Klaver wrote: On 09/14/2014 02:01 PM, cowwoc wrote: See http://dba.stackexchange.com/q/76494/4719 for a related discussion. So from the above link and the discussion here so far I gather you want:

Re: [GENERAL] Feature request: temporary schemas

2014-09-14 Thread cowwoc
Hi Adrian, Replies below. On 14/09/2014 8:34 PM, Adrian Klaver wrote: On 09/14/2014 02:01 PM, cowwoc wrote: See http://dba.stackexchange.com/q/76494/4719 for a related discussion. So from the above link and the discussion here so far I gather you want: 1) A CREATE TEMPORARY SCHEMA that behav

Re: [GENERAL] Feature request: temporary schemas

2014-09-14 Thread Adrian Klaver
On 09/14/2014 02:01 PM, cowwoc wrote: Hi, I'd like to propose the ability to create temporary schemas. Unlike temporary tables, this feature would enable developers to create a temporary schema once and execute CREATE TABLE statements without the TEMPORARY parameter. This would facilitate runn

Re: [GENERAL] Feature request: temporary schemas

2014-09-14 Thread Nick Guenther
On September 14, 2014 6:01:15 PM EDT, cowwoc 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] >> > wrote: >> >Hi, >> > >> >I'd like to propose the ability to create temporary schemas. >> > >> >This would

Re: [GENERAL] Feature request: temporary schemas

2014-09-14 Thread cowwoc
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

Re: [GENERAL] Feature request: temporary schemas

2014-09-14 Thread Nick Guenther
On September 14, 2014 5:01:54 PM EDT, cowwoc 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 tem