[PyGreSQL] createdb from pygresql

D'Arcy J.M. Cain darcy at PyGreSQL.org
Wed Mar 28 09:03:15 EDT 2007


On Wed, 28 Mar 2007 14:49:53 +0200
"Richard Mendes" <mendes150 at gmail.com> wrote:
> The problem we experiencing is that the command line creation of a
> database without a password runs on unix but on windows it seems as if
> a password is obligated. To prevent to create databases threw the
> command line i was wondering if there is a method to create a db with
> username and password in pygresql. This should give us the solution we
> we're looking for.

Not strictly a PyGreSQL question but you can use the query method to
send database creation queries directly to the backend.  You can use
template1 as the database you connect to to do this.

Check out the "CREATE DATABASE" and "CREATE USER" commands in
PostgreSQL.

-- 
D'Arcy J.M. Cain
PyGreSQL Development Group
http://www.PyGreSQL.org


More information about the PyGreSQL mailing list