Re: Sample database for testing?

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: bangh <banghe(at)baileylink(dot)net>
Cc: Andy Ruhl <acruhl(at)sdf(dot)lonestar(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Sample database for testing?
Date: 2002-02-01 21:19:03
Message-ID: 1012598344.3181.29.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, 2002-02-01 at 20:26, bangh wrote:
> There is a database template1 you can play with.
>
> If there is no table in template1, you can create one by:
>
> psql template1
> psql> create table mytable (
> psql> mydate datetime,
> psql> mymem text);
> psql> insert into mytable values('now', 'I am doing this today');
> psql> select * from mytable;
> psql>\q;

If you do this, you will have mytable in every database you create
thereafter. It is not called a template for no reason! template1 is
copied in its entirety into every new database when it is created. (And
so the rest of the advice is redundant, too.)

A better choice is to run the regression tests and use the regression
database for your experiments, since it will have a lot of tables
already containing data.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"And be not conformed to this world; but be ye
transformed by the renewing of your mind, that ye may
prove what is that good, and acceptable, and perfect,
will of God." Romans 12:2

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andy Ruhl 2002-02-01 23:01:38 Re: Sample database for testing?
Previous Message Stephan Szabo 2002-02-01 20:27:27 Re: Urgent help neede - Important - Tks