Re: CREATE DATABASE - Mailing list pgsql-general

From Richard Huxton
Subject Re: CREATE DATABASE
Date
Msg-id 44D22D59.3030009@archonet.com
Whole thread Raw
In response to CREATE DATABASE  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
Responses Re: CREATE DATABASE  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
List pgsql-general
Rafal Pietrak wrote:
> Hi All,
>
> I'd like to cast a small 'feature request' here for discussion/
> evaluation. The case is the following:
>
> When working on a new database application I quite frequently:
> -------------------------------
>     test_xx# \c template1
>     template1# DROP DATABASE test_xx;
>     template1# CREATE DATABASE test_xx TEMPLATE = earlier_version;
>     template1# \c test_xx
>     template1# \i some_cooked_dataset.sql-dump
> -------------------------------
>
> All this is of cource issued from psql utility, and using psql_history
> buffer.
>
> Now, the thing is, that I have to be very carefull and focused when
> going back in psql_history, as several times I've skiped the "\c
> test_xx" stage .... and ended up in a mass.

The quickest solution is to put the whole thing in one script and
execute that with \i or -f from the command-prompt.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Ilja Golshtein"
Date:
Subject: xmin
Next
From: Richard Huxton
Date:
Subject: Re: Vacuum, Analyze, ReIndex from within VB.NET 2003