From: Daniele Varrazzo Date: Fri, 6 Nov 2020 23:52:45 +0000 (+0000) Subject: Added TypeInfo representation X-Git-Tag: 3.0.dev0~395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f85675d98eabe141bd45e260b01e568cbf6a7a6;p=thirdparty%2Fpsycopg.git Added TypeInfo representation --- diff --git a/psycopg3/psycopg3/oids.py b/psycopg3/psycopg3/oids.py index 7aebf19a1..99c5f7513 100644 --- a/psycopg3/psycopg3/oids.py +++ b/psycopg3/psycopg3/oids.py @@ -19,6 +19,12 @@ class TypeInfo: self.oid = oid self.array_oid = array_oid + def __repr__(self) -> str: + return ( + f"<{self.__class__.__qualname__}:" + f" {self.name} (oid: {self.oid}, array oid: {self.array_oid})>" + ) + class BuiltinTypeInfo(TypeInfo): def __init__(