Re: Python + PostgreSQL - Mailing list pgsql-interfaces

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: Python + PostgreSQL
Date
Msg-id m13KLXH-000AX9C@druid.net
Whole thread Raw
In response to Re: Python + PostgreSQL  (Karl Thomas Diedrich <died9501@uidaho.edu>)
List 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@{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.


pgsql-interfaces by date:

Previous
From: "luc00"
Date:
Subject: libpq++ app code examples ?
Next
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: Python + PostgreSQL