7.3.1 - python pgdb getdesc bug

Started by Adam DePrince, CSAover 23 years ago2 messagespatches
Jump to latest
#1Adam DePrince, CSA
adam@cognitcorp.com

pgdb.getdesc tries select the typprtlen field from pg_types, but fails
because it isn't in 7.3.1. It is my understanding that this field would
contain -1 if there was no set limit on the length of the returned
string representing the data type. Instead if "guessing" and risking
that future changes would be out of sync, I removed the typprtlen field
from the query, modified the indices within the result set and replaced
any reference to the old typprtlen rs position with -1 so that getdesc
returns the same tuple format.

This patch is intended to be patched against the untarred postgresql
7.3.1 tarball ala cd postgresql-7.3.1;patch -p1 <
pgsql-7.3.1-pydb-getdesc.patch

- Adam

--
Adam DePrince
Chief Software Architect
Cognit Enterprises

Attachments:

pgsql-7.3.1-pydb-getdesc.patchtext/x-patch; charset=ISO-8859-15; name=pgsql-7.3.1-pydb-getdesc.patchDownload+2-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Adam DePrince, CSA (#1)
Re: 7.3.1 - python pgdb getdesc bug

"Adam DePrince, CSA" <adam@cognitcorp.com> writes:

pgdb.getdesc tries select the typprtlen field from pg_types, but fails
because it isn't in 7.3.1. It is my understanding that this field would
contain -1 if there was no set limit on the length of the returned
string representing the data type.

This is already patched for 7.3.2. My understanding is that 'None'
was determined to be the correct value.

regards, tom lane