Re: Create Database using JDBC

Поиск
Список
Период
Сортировка
От Thomas Dudziak
Тема Re: Create Database using JDBC
Дата
Msg-id 224f3234050701032612fabe04@mail.gmail.com
обсуждение исходный текст
Ответ на Create Database using JDBC  ("Nidhi Srivastava" <nsrivastava@quark.com>)
Ответы Re: Create Database using JDBC
Список pgsql-jdbc
On 7/1/05, Nidhi Srivastava <nsrivastava@quark.com> wrote:

> I wish to create a database if one doesn't exist using JDBC. I tried
> connecting to template1 database and then issuing the "CREATE DATABASE test"
> command but I get the following error :
>
>   ERROR:  CREATE DATABASE: source database "template1"
> is being accessed by other users
>
> How do I resolve this? I'm using PostGreSQL8.0

This should work (we're doing it exactly the same way). But there can
only be one user connected at a time to the template database, it
seems, at least when using the CREATE DATABASE command. Do you have
the one of the PostgreSQL tools open, eg. pgAdmin ?

Tom

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

Предыдущее
От: "Nidhi Srivastava"
Дата:
Сообщение: Create Database using JDBC
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Create Database using JDBC