Re: CREATE DATABASE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CREATE DATABASE
Дата
Msg-id 25136.1154635750@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CREATE DATABASE  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
Ответы Re: CREATE DATABASE
Список pgsql-general
Rafal Pietrak <rafal@zorro.isa-geek.com> writes:
> 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?

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).  The server cannot force the client to do
that, and we're unlikely to look favorably on adding syntax that the
server is supposed to ignore while the client starts parsing every
command to see if it's in there.

You could imagine inventing a psql operation like

    \create_and_connect_to dbname ... other createdb parameters ...

but it still seems more like a kluge than a useful feature.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PITR timeline question
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Well, Pervasive is now out....