CREATE DATABASE - Mailing list pgsql-general

From Rafal Pietrak
Subject CREATE DATABASE
Date
Msg-id 1154622558.5515.23.camel@zorro.isa-geek.com
Whole thread Raw
Responses Re: CREATE DATABASE
List pgsql-general
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.

Now, the solution looks simple: if only "CREATE DATABASE" had an
additional keyword, like CONNECT, meaning "\c <newdb>" after successful
DB creation, the execution a similar sequence from history buffer, would
be much safer.

So I'd like to express here this 'feature request' - Regretably, I'm not
quite up to implementing such feature myself, but may be someone can?
Comments?

--
-R

pgsql-general by date:

Previous
From: "Carlo Stonebanks"
Date:
Subject: Re: Best Procedural Language?
Next
From: "Rohit Prakash Khare"
Date:
Subject: Vacuum, Analyze, ReIndex from within VB.NET 2003