Re: Create Database using JDBC

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Nidhi Srivastava <nsrivastava(at)quark(dot)com>
Cc: "Thomas Dudziak" <tomdzk(at)gmail(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Create Database using JDBC
Date: 2005-07-04 19:02:35
Message-ID: 35F527E3-65B9-4DD7-B99F-2A95D8DF994D@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

select * from pg_stat_activity

Dave
On 4-Jul-05, at 9:08 AM, Nidhi Srivastava 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?
>
>
> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Thomas Dudziak
> Sent: Monday, July 04, 2005 4:39 PM
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: Re: [JDBC] Create Database using JDBC
>
> On 7/4/05, Nidhi Srivastava <nsrivastava(at)quark(dot)com> wrote:
>
>>
>> But even that alternate template database would need to be created
>> the
>> first time after server installation by connceting to the template1
>>
> DB??
>
>> Right??
>>
>> All I want is to automate database creation the first time after
>>
> server
>
>> installation eliminate user inputs
>>
>
> But why then not requiring that no one is connected to the template1
> database ? That shouldn't be too much of a requirement. Myself, I
> develop with postgres on a daily basis (using JDBC), and even I have
> pgAmin only open when necessary eg. for checking that some data was
> inserted in the db or testing a query.
>
> Tom
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>
>

Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
ICQ #14675561
jabber davecramer(at)jabber(dot)org
ph (519 939 0336 )

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-07-05 00:03:30 Re: Create Database using JDBC
Previous Message Thomas Dudziak 2005-07-04 16:24:49 Re: Create Database using JDBC