Re: CREATE DATABASE

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Rafal Pietrak" <rafal(at)zorro(dot)isa-geek(dot)com>, "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: CREATE DATABASE
Date: 2006-08-03 20:29:30
Message-ID: e431ff4c0608031329i7cb2f719xcf6eed631d3c4305@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/4/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The reason neither of these are going to happen is that you're confusing
> a server-side SQL command (viz CREATE DATABASE) with a client-side
> operation (viz choosing to drop the server connection and make a new one
> to a different database).

Hmm.. I always thought that creating connection is two-sided operation
(client sends requests, server accepts and sends that all is OK,
including that client sent proper user/pwd and wants to connect to
proper DB).

You're breaking my knowledge of client-server architecture.

What is the difference between the procedure of connection
establishing and database creation from user POV? Client asks server
and server does some work and then replies. What kind of work?
Permissions checking or creating of DB - yes, very different things,
but the difference is significant for backend! Notice, that for client
there is no such huge difference. The only difference is the order of
operations. BTW, difference vanishes due to expression power of SQL -
it supports session comands in the same context as DDL commands and
data manipulation stmts (SQL:200n, 4.33.2.5 'SQL-connection
statements').

If I'm wrong, I'd be very glad to see your contradiction.

--
Best regards,
Nikolay

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message J B 2006-08-03 20:31:09 Re: Well, Pervasive is now out....
Previous Message Tom Lane 2006-08-03 20:13:35 Re: SAVEPOINT and FOR UPDATE