Re: cloning database - Mailing list pgsql-general

From Albe Laurenz
Subject Re: cloning database
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17D41611@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to cloning database  (Philipp Kraus <philipp.kraus@flashpixx.de>)
List pgsql-general
Philipp Kraus wrote:
> I need around 150 copies of a database (for an exam). I have got a
> database with tables and data and for my exam I would copy this
> database in his way:
> 
> database_source
> 
> database1
> database2
> ….
> database150
> 
> Is there a buildin way to clone the "database_source" with all
> structure and data into a new database "database1..150" ?

CREATE DATABASE database1 TEMPLATE database_source;

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Szymon Guz
Date:
Subject: Re: Why isn't Java support part of Postgresql core?
Next
From: Marius Grama
Date:
Subject: ALTER TEXT field to VARCHAR(1024)