Re: PostgreSQL 7.4.1 and pgdb.py

From: "Manuel Tejada" <mantemu(at)terra(dot)com(dot)pe>
To: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL 7.4.1 and pgdb.py
Date: 2004-02-02 01:24:25
Message-ID: 001c01c3e92b$4c03f860$a4e430c8@alejo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you very much Gaetano

I edited the pgdb.py file setting "4" instead of "typprtlen".
Now I am able to connect to PostgreSQL using pgdb.py.

Just for curiosity, Can I set to -1 too as Gerhard Haring told to you?

----- Original Message -----
From: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
Newsgroups: comp.databases.postgresql.general
Cc: "Manuel Tejada" <mantemu(at)terra(dot)com(dot)pe>
Sent: Sunday, February 01, 2004 4:48 PM
Subject: Re: PostgreSQL 7.4.1 and pgdb.py

> Manuel Tejada wrote:
> >
> >>>>import pgdb
> >>>>dbConnect = pgdb.connect(dsn='localhost:oracle', user='manuel',
> >
> > password='')
> >
> >>>>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/pgdb.py", line 189, in execute
> > self.executemany(operation, (params,))
> > File "/usr/lib/python2.2/site-packages/pgdb.py", line 221, in
executemany
> > desc = type[1:2]+self ._cache.getdescr(typ[2])
> > File "/usr/lib/python2.2/site-packages/pgdb.py", line 149, in
getdescr
> > self ._source.execute(
> > _pg.error: ERROR: non exist the column "typprtlen"
> > ------------------
>
> This is a really old problem already solved on 7.3 see this my post:
>
> http://archives.postgresql.org/pgsql-bugs/2002-12/msg00082.php
>
> I'm checking that my 7.4.1 installation is affected by the same
> problem. I don't understand how this could happen that a modification
> made on a 7.3 was not ported to 7.4
>
> For the moment what you can do is substitute this select:
>
> "SELECT typname, typprtlen, typlen "
> "FROM pg_type WHERE oid = %s" % oid
>
> inside the file pgdb.py with this one:
>
> "SELECT typname, 4, typlen "
> "FROM pg_type WHERE oid = %s" % oid
>
> just to not break all file.
>
> I'm not able to look at CVS to see where the modification was lost.
>
> Regards
> Gaetano Mendola
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2004-02-02 01:26:45 Re: PostgreSQL 7.4.1 and pgdb.py
Previous Message Tom Lane 2004-02-01 22:34:03 Re: Functions in CHECK constraint not getting dumped before tables.