mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
Remove typprtlen from getdescr() as it is not available in 7.3. Return -1 for
that field so that existing programs don't break.
This commit is contained in:
parent
93902e9521
commit
e3d7c9ba54
@ -147,7 +147,7 @@ class pgdbTypeCache:
|
|||||||
return self.__type_cache[oid]
|
return self.__type_cache[oid]
|
||||||
except:
|
except:
|
||||||
self.__source.execute(
|
self.__source.execute(
|
||||||
"SELECT typname, typprtlen, typlen "
|
"SELECT typname, typlen "
|
||||||
"FROM pg_type WHERE oid = %s" % oid
|
"FROM pg_type WHERE oid = %s" % oid
|
||||||
)
|
)
|
||||||
res = self.__source.fetch(1)[0]
|
res = self.__source.fetch(1)[0]
|
||||||
@ -155,7 +155,7 @@ class pgdbTypeCache:
|
|||||||
# have to be prepended by the caller.
|
# have to be prepended by the caller.
|
||||||
res = (
|
res = (
|
||||||
res[0],
|
res[0],
|
||||||
string.atoi(res[1]), string.atoi(res[2]),
|
-1, string.atoi(res[1]),
|
||||||
None, None, None
|
None, None, None
|
||||||
)
|
)
|
||||||
self.__type_cache[oid] = res
|
self.__type_cache[oid] = res
|
||||||
|
Loading…
x
Reference in New Issue
Block a user