Re: Create Database using JDBC

Поиск
Список
Период
Сортировка
От Nidhi Srivastava
Тема Re: Create Database using JDBC
Дата
Msg-id 2BC68159E3EC814BA1E81C108DF99A4203A37FDB@EXCH-IND-VS1.india.quark.com
обсуждение исходный текст
Ответ на Create Database using JDBC  ("Nidhi Srivastava" <nsrivastava@quark.com>)
Список pgsql-jdbc
Yes I have the pgAdmin open. Is there any work around to check if more
than one users are connected to the server and resolve this?

Or is there any way I can create a DB at the time of Postgres
installation itself. I'm using postgresql8.0 on windows.

If you can't see the bright side of life, polish the dull side.

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Thomas Dudziak
Sent: Friday, July 01, 2005 3:56 PM
To: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Create Database using 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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: jdbc cts final diff for review
Следующее
От: 時期 精霊
Дата:
Сообщение: Streaming blob to db