Re: Create Database using JDBC - Mailing list pgsql-jdbc

From Thomas Dudziak
Subject Re: Create Database using JDBC
Date
Msg-id 224f323405070409241a7edd67@mail.gmail.com
Whole thread Raw
In response to Create Database using JDBC  ("Nidhi Srivastava" <nsrivastava@quark.com>)
List pgsql-jdbc
On 7/4/05, Nidhi Srivastava <nsrivastava@quark.com> wrote:
> Problem is if any client application is connected to another database on
> my server anywhere, I shall not able to create my database using
> template1. How can I determine which other clients are connected to my
> server?

Have you tried that this doesn't work ? If none of the clients is
connected to template1 but only to their own databases, then AFAIK it
should work (pgAdmin might be different in this matter, perhaps it is
always connected to the template databases ?).
You could write a small JDBC app to verify that it does/doesn't work, eg.

* open a connection to template1
* create database test
* close connection to template1
* open connection to test and keep it open
* open connection to template1
* create database test2
* close connection to template1
* close connection to test

if this doesn't work, then you probably should file a bug and attach
this sample app.

Tom

pgsql-jdbc by date:

Previous
From: Thomas Dudziak
Date:
Subject: Re: Create Database using JDBC
Next
From: "Nidhi Srivastava"
Date:
Subject: Re: Create Database using JDBC