Re: Starting and stopping database by JAVA

From: Richard Huxton <dev(at)archonet(dot)com>
To: Juleni <julo(at)opensubsystems(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Starting and stopping database by JAVA
Date: 2004-09-08 07:25:42
Message-ID: 413EB3F6.1000304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

juleni(at)livetrade(dot)cz wrote:
> Hello,
>
> is there a possibility starting or stopping postgres database and
> creating database instance by JAVA? Is there some API available for
> this? If yes, can you please write some example, how to do it?

Starting/stopping a system service is by its nature going to be
operating-system specific, so I think you're best bet would be to call
some external scripts to do this.

Creating a new database can be done by connecting to database template1
and issuing "CREATE DATABASE ...", you can do similarly with users. See
the "SQL Commands" section of the manuals for details.

HTH
--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tore Halset 2004-09-08 09:25:17 Re: ERROR: canceling query due to user request
Previous Message Tore Halset 2004-09-08 07:07:03 Re: ERROR: canceling query due to user request