Re: Novice Question

From: Chris Kratz <chris(dot)kratz(at)vistashare(dot)com>
To: Michael Romagnoli <michael(at)houseind(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Novice Question
Date: 2005-03-01 22:38:42
Message-ID: 200503011738.42471.chris.kratz@vistashare.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

create database newdb template olddb;

works as well.

-Chris

On Tuesday 01 March 2005 05:08 pm, javier wilson wrote:
> On Tue, 01 Mar 2005 16:30:19 -0500, Michael Romagnoli
>
> <michael(at)houseind(dot)com> wrote:
> > Sorry, I meant to ask about copying databases, not tables (including all
> > data in the database as per below).
>
> you can do a pg_dump your_database>your_database.dump.sql
> and then createdb to create your new database, and finally
> pgsql -f your_database.dump.sql new_database
>
> and that's it. you should probably use -Upostgres
> depending on what kind of security you use.
>
> javier
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2005-03-01 23:23:22 Re: Trigger email?
Previous Message Ragnar Hafstað 2005-03-01 22:28:16 Re: sql join question