Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 7C6DD9FA16B for ; Sun, 19 Nov 2006 17:42:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 65278-02 for ; Sun, 19 Nov 2006 17:42:13 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 85AA59F9F47 for ; Sun, 19 Nov 2006 17:42:15 -0400 (AST) Received: (qmail invoked by alias); 19 Nov 2006 21:42:13 -0000 Received: from xdsl-81-173-229-129.netcologne.de (EHLO [192.168.3.10]) [81.173.229.129] by mail.gmx.net (mp025) with SMTP; 19 Nov 2006 22:42:13 +0100 X-Authenticated: #2870507 Message-ID: <4560CFAF.7020105@gmx.net> Date: Sun, 19 Nov 2006 22:42:07 +0100 From: Roland Walter User-Agent: Thunderbird 1.5.0.8 (X11/20060911) MIME-Version: 1.0 To: Charlie Kelly CC: pgsql-jdbc@postgresql.org Subject: Re: Use Driver to Create database? References: <1163715629.8932.22.camel@mokki.local> <4560B46C.50109@CharlieKelly.com> In-Reply-To: <4560B46C.50109@CharlieKelly.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/92 X-Sequence-Number: 16134 -----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-----