All,
If you google for pygresql examples, not much comes up.. so I figured i'd
make a contribution. I have started to put up some PyGreSQL code snippets
on my site. I will be adding more throughout the week. Let me know what
you think. I will also be putting up some psychopg
http://www.joevial.com/wiki/Snippets/Python/PyGreSQL
Joe
http://www.joevial.com/wiki/Snippets/Python/PyGreSQL
On 3/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Send PyGreSQL mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.vex.net/mailman/listinfo/pygresql
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of PyGreSQL digest..."
Today's Topics:
1. createdb from pygresql (Richard Mendes)
2. Re: createdb from pygresql (D'Arcy J.M. Cain)
3. Re: createdb from pygresql (Christoph Zwerschke)
----------------------------------------------------------------------
Message: 1
Date: Wed, 28 Mar 2007 14:49:53 +0200
From: "Richard Mendes" <[EMAIL PROTECTED]>
Subject: [PyGreSQL] createdb from pygresql
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hello All,
I'm working on a project where we have to create multiple db's from a
script and by using pygresql we fill these db's.
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.
any help would be greatly appreciated,
thanks in advance,
richard
------------------------------
Message: 2
Date: Wed, 28 Mar 2007 09:03:15 -0400
From: "D'Arcy J.M. Cain" <[EMAIL PROTECTED]>
Subject: Re: [PyGreSQL] createdb from pygresql
To: PyGreSQL Development <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII
On Wed, 28 Mar 2007 14:49:53 +0200
"Richard Mendes" <[EMAIL PROTECTED]> 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
------------------------------
Message: 3
Date: Wed, 28 Mar 2007 15:25:22 +0200
From: Christoph Zwerschke <[EMAIL PROTECTED]>
Subject: Re: [PyGreSQL] createdb from pygresql
To: PyGreSQL Development <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
Richard Mendes 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.
The only thing is that you must be logged in as a database user with
sufficient privileges to create a database, for instance as the postgres
user. Under Unix, if you are the postgres OS user, then you usually can
automatically login as the postgres DB user on the console. Under
Windows, this will probably also work if you login as the postgres user
or start psql as the postgres user with "runas".
See also:
http://www.postgresql.org/docs/8.2/interactive/manage-ag-createdb.html
-- Chris
------------------------------
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql
End of PyGreSQL Digest, Vol 45, Issue 3
***************************************
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql