Re: CREATE DATABASE

From: Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>
To: nikolay(at)samokhvalov(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: CREATE DATABASE
Date: 2006-08-04 19:23:35
Message-ID: 1154719416.5515.82.camel@zorro.isa-geek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew T. O'Connor 2006-08-04 19:46:09 Re: PITR Questions
Previous Message Tom Lane 2006-08-04 19:10:22 Re: pg_xlog not cleaned up