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

PostgreSQL 7.4.1 and

From: "Manuel Tejada" <mantemu(at)terra(dot)com(dot)pe>
To: <pgsql-general(at)postgresql(dot)org>
Subject: PostgreSQL 7.4.1 and
Date: 2004-01-31 02:13:09
Message-ID: 000a01c3e79f$c7e2ed20$4bd73cc8@leon (view raw, whole thread or download thread mbox)
Lists: pgsql-general
My box: RedHat 9.0, Pentium III

Recently I upgraded from PostgreSQL 7.3.2 to PostgreSQL 7.4.1.
The PostgreSQL 7.3.2's rpms were installed from RehHat CDs
The PostgreSQL 7.4.1's rpms I used to upgrade were downloaded from RHEL3
subdirectory (of the mirror

The upgrade is working well, even I can connect to PostgreSQL from a PHP

Before upgrading I used to connect to PostgresQL using (part of
PyGreSQL that comes with one of the rpms I guess). The sintaxis I was using
from interactive shell were:

>>>import pgdb
>>>dbConnect = pgdb.connect(dsn='localhost:oracle', user='manuel',
>>>cursor = dbConnect.cursor()
>>>cursor.execute("select * from address")
>>>while (1):
...     row = cursor.fetchone()
...     if row == None:
...        break
...     print row

As you can see, the connection and fechting were successful.

But now when I input the same sintaxis with the new Installation(PostgreSQL
7.4.1), I get an error when I enter rhe four line:

>>>import pgdb
>>>dbConnect = pgdb.connect(dsn='localhost:oracle', user='manuel',
>>>cursor = dbConnect.cursor()
>>>cursor.execute("select * from address")
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.2/site-packages/", line 189, in execute
self.executemany(operation, (params,))
   File "/usr/lib/python2.2/site-packages/", line 221, in executemany
desc = type[1:2]+self ._cache.getdescr(typ[2])
   File "/usr/lib/python2.2/site-packages/", line 149, in getdescr
self  ._source.execute(
_pg.error: ERROR: non exist the column "typprtlen"

By the way the types of columns from address table are:
lastname  varchar(25)
firstname varchar(25)
street      varchar(30)
city         varchar(15)
state       varchar(2)
zip         int
phone    varchar(12)
ext        varchar(5)

My questions:

-Anybody knows why I can't connect to PostgreSQL using the module
- Perhaps the sintaxis has changed?

Manuel Tejada


pgsql-general by date

Next:From: Lee HarrDate: 2004-01-31 02:22:09
Subject: Re: Are there commands to enquire about table structure?
Previous:From: listasDate: 2004-01-31 02:05:02
Subject: Re: IDENT and pg_hda.conf

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