From: Roland Walter <roland.walter.rwa@gmx.net>
To: Charlie Kelly <Charlie@CharlieKelly.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Use Driver to Create database?
Date: Sun, 19 Nov 2006 22:42:07 +0100
Message-ID: <4560CFAF.7020105@gmx.net> (raw)
In-Reply-To: <4560B46C.50109@CharlieKelly.com>
References: <1163715629.8932.22.camel@mokki.local>
<4560B46C.50109@CharlieKelly.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Charlie Kelly wrote:
> Is it possible to use the driver to create a new database (inside a java
> program),
> or is it necessary to first create the database using the createdb utility?
>
> If it is possible to use the driver, what is the correct syntax?
>
There is a SQL-command for that, look here:
http://www.postgresql.org/docs/8.1/interactive/sql-createdatabase.html
First connect to the postgres or template1 schema of the cluster, that
you created with initdb. Execute the "CREATE DATABASE". Reconnect to the
database you created.
Regards,
Roland.
- --
Dipl.-Phys. Roland Walter
mailto: roland (dot)walter (dot) rwa (at) gmx (dot) net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFFYM+vxoOEAkary1ERAmASAJ0YfU9L9hepz68I0A2/yzV3ZjSAjwCeOnqU
LqefeHLpkkc2Np7cRYVmawY=
=4SOY
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: roland.walter.rwa@gmx.net, Charlie@CharlieKelly.com
Subject: Re: Use Driver to Create database?
In-Reply-To: <4560CFAF.7020105@gmx.net>
References: <1163715629.8932.22.camel@mokki.local> <4560B46C.50109@CharlieKelly.com> <4560CFAF.7020105@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox