Re: CREATE DATABASE - Mailing list pgsql-general

From Rafal Pietrak
Subject Re: CREATE DATABASE
Date
Msg-id 1154630636.5515.50.camel@zorro.isa-geek.com
Whole thread Raw
In response to Re: CREATE DATABASE  (Richard Huxton <dev@archonet.com>)
Responses Re: CREATE DATABASE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, 2006-08-03 at 18:07 +0100, Richard Huxton wrote:
> Rafal Pietrak wrote:
> > 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
> > -------------------------------
>
> The quickest solution is to put the whole thing in one script and
> execute that with \i or -f from the command-prompt.

Well, the trick is, that when I refere back to previous CREATE DATABASE,
I quite often adjust it: name or owner, or template.

To put it the other way around: I don't remember me creating a database
and *needing* to stay within the initiator (like template1) - that's why
I've ventured the feature request. If not a 'CONNECT' option, may be z
"SET parameter" for a session user? This way pg_dumpall, which does
CREATE DATABASE and stays with the old one, since it is supposed to be
run as user postgres will continue to work correctly.

Frankly, when posting the original e-mail I feared to receive: "NO!!
that'll break a lot of scripts/applications". But if that's not the
case, I'd vote to put this request into (event very low priority)
to-be-implementes list. postgres is awesome to work with, part of the
quality of a 'product' is good set of defaults - having "CREATE DB"
connect to the new instance is GoodThing(tm) :).

just my 2c. not that I'm eager to elaborate this case any further.

Thenx.
--
-R

pgsql-general by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: PostgreSQL on RAM Disk / tmpfs
Next
From: Tony Caduto
Date:
Subject: Well, Pervasive is now out....