Skip site navigation (1) Skip section navigation (2)

Re: Use Driver to Create database?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Charlie Kelly <Charlie(at)CharlieKelly(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Use Driver to Create database?
Date: 2006-11-20 05:07:44
Message-ID: 45613820.6080909@hogranch.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
>> 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.
>
> You don't want to connect to template1, though, if the program is 
> going to be used concurrently by more than one use. Template1 is used 
> as template (hence the name) to make the new database, and it will 
> throw an error if there's any other users connected to it beside the 
> one issuing the CREATE DATABASE command.
>

indeed.  In fact you can connect to ANY existing database prior to 
issusing the CREATE DATABASE command.  It is important, however, that 
you be logged on with credentials that have the CREATEDB privilege



In response to

pgsql-jdbc by date

Next:From: Michael PaesoldDate: 2006-11-20 07:38:27
Subject: Re: JDBC Support for standard_conforming_strings
Previous:From: Heikki LinnakangasDate: 2006-11-19 22:04:10
Subject: Re: Use Driver to Create database?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group