From: D'Arcy J.M. Cain Date: Wed, 4 Dec 2002 12:23:42 +0000 (+0000) Subject: Remove typprtlen from getdescr() as it is not available in 7.3. Return -1 for X-Git-Tag: REL7_4_BETA1~1443 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3d7c9ba5434cdf743a8b921db457f3fb52a377d;p=postgresql Remove typprtlen from getdescr() as it is not available in 7.3. Return -1 for that field so that existing programs don't break. --- diff --git a/src/interfaces/python/pgdb.py b/src/interfaces/python/pgdb.py index 62b551b995..9a37cce7cc 100644 --- a/src/interfaces/python/pgdb.py +++ b/src/interfaces/python/pgdb.py @@ -147,7 +147,7 @@ class pgdbTypeCache: return self.__type_cache[oid] except: self.__source.execute( - "SELECT typname, typprtlen, typlen " + "SELECT typname, typlen " "FROM pg_type WHERE oid = %s" % oid ) res = self.__source.fetch(1)[0] @@ -155,7 +155,7 @@ class pgdbTypeCache: # have to be prepended by the caller. res = ( res[0], - string.atoi(res[1]), string.atoi(res[2]), + -1, string.atoi(res[1]), None, None, None ) self.__type_cache[oid] = res