From: | Gerhard Häring <haering_postgresql(at)gmx(dot)de> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Gaetano Mendola <mendola(at)bigfoot(dot)com>, PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>, darcy(at)druid(dot)net |
Subject: | Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm |
Date: | 2003-01-07 23:28:53 |
Message-ID: | 20030107232853.GB512@lilith.ghaering.test |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-bugs pgsql-interfaces |
* Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> [2003-01-07 17:13 -0500]:
> CC'ing D'Arcy.
>
> Sorry, we really can't backpatch that unless D'Arcy does it. He
> controls the python interface and applied the patch only to CVS head.
>
> ---------------------------------------------------------------------------
>
> Gaetano Mendola wrote:
> > I already post the fact that the file pgdb.py distribuited with
> > Postgres 7.3 is wrong but was not already fixed in 7.3.1 !!!!
> >
> > The class pgdbTypeCache is not working with the version 7.3.1
> > the method getdescr try to do the following select:
> >
> > "SELECT typname, typprtlen, typlen FROM pg_type"
> >
> > and the column typprtlen is not anymore available,
> > I suggested to rewrite that select in this way:
> >
> > "SELECT typname, 4, typlen FROM pg_type"
> >
> > and someone else suggested:
> >
> > "SELECT typname, -1, typlen FROM pg_type"
That was me.
This, however is WRONG, (and I'll also have to fix it in pyPgSQL
eventually).
I recently asked a related question in the Python DB-SIGs mailing list
recently in a thread
"cursor.description - values for 'I don't know'"
asking which value to use for unknown values in cursor.description
(here: the displaysize field).
The answer is to use None for unknown values, *not* -1 like I proposed
above. In fact, the DB-API 2.0 specification clearly says so, but it
somehow slipped my eye.
Gerhard
--
Favourite database: http://www.postgresql.org/
Favourite programming language: http://www.python.org/
Combine the two: http://pypgsql.sf.net/
Embedded database for Python: http://pysqlite.sf.net/
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 2003-01-08 02:51:48 | Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm |
Previous Message | Tilo Schwarz | 2003-01-07 23:13:24 | Re: Vacuum explained |
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql-bugs | 2003-01-08 00:03:25 | Bug #865: PostgreSQL 7.3 and 7.3.1 fails to compile pg_dump |
Previous Message | Bruce Momjian | 2003-01-07 22:51:43 | Re: [BUGS] pgdb.py is still wrong [not just] in Postgres 7.3.1 |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-01-07 23:29:02 | Re: MOVE LAST: why? |
Previous Message | Tom Lane | 2003-01-07 23:07:18 | MOVE LAST: why? |