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

Re: Python + PostgreSQL

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: Karl Thomas Diedrich <died9501(at)uidaho(dot)edu>
Cc: Antonio Navarro Navarro <hostmaster(at)bemarnet(dot)es>, pgsql-interfaces(at)hub(dot)org
Subject: Re: Python + PostgreSQL
Date: 2000-08-03 13:59:47
Message-ID: m13KLXH-000AX9C@druid.net (view raw or flat)
Thread:
Lists: pgsql-interfaces
Thus spake Karl Thomas Diedrich
> I used the Postgresql python package to write a program. I couldn't find
> any documentation either. Examples come in the RedHat package.

Look at the actual distribution either in the PostgreSQL tree or download
the package from http://www.druid.net/pygresql/ and look at the README file.

> I used qit like this:
> from pg import DB
> cnx = DB("database-name")
> cnx.query("""CREATE TABLE ...""")

The reccommended way is now;

import pg
cnx = pg.DB("database-name")

The reason for this is to make pg.error and possibly other things available.

-- 
D'Arcy J.M. Cain <darcy(at){druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.

In response to

pgsql-interfaces by date

Next:From: D'Arcy J.M. CainDate: 2000-08-03 14:05:50
Subject: Re: Python + PostgreSQL
Previous:From: luc00Date: 2000-08-03 13:51:59
Subject: libpq++ app code examples ?

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