Re: CREATE DATABASE - Mailing list pgsql-general

From Rafal Pietrak
Subject Re: CREATE DATABASE
Date
Msg-id 1154719416.5515.82.camel@zorro.isa-geek.com
Whole thread Raw
In response to Re: CREATE DATABASE  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
List pgsql-general
On Fri, 2006-08-04 at 00:44 +0400, Nikolay Samokhvalov wrote:
> But the logic is clear, isn't it? Connection is not client operation.
> I think that Rafal's proposal is quite interesting (I experience the
> same difficulties every time. There was several wrong DROP DATABASE in
> my career... :-) )

Glad to see at leas some backing :) So I'd push the case a little
further.

I'm not very proficient with the stadard per se. So I'm not sure what
exactly the 4.33... define, but in any case, my original intention was
to have 'some extra magic' behind the screen (meaning, not neceserly to
the letter of a standard - a natural newbee behavior :).

Originally I though that having just CONNECT option for CREATE DATABASE,
or some sort of "SET connect2_fresh_database = true" in session
parameters would suffice. But now I realise, that client side library is
supposed to know which database it's talking to (at least the psql
command line utility should be able to change its prompt accordingly,
like it does today) which escalates the problem technicaly. Namely, even
if the 'extra magic' is implemented in the visinity of 'CREATE DATABASE'
code, there have to be a way for the backend to pass that information to
the frontend (over the backend-frontend protocol) .... which may not be
so easy to implement... I gues.

Anyway. I'd be good to have :)

--
-R

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_xlog not cleaned up
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: PITR Questions