From: Daniele Varrazzo Date: Tue, 12 Jan 2021 21:47:19 +0000 (+0100) Subject: Added [] in the representation of array columns X-Git-Tag: 3.0.dev0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40217e2dc73494832119644415b58b490bd316f8;p=thirdparty%2Fpsycopg.git Added [] in the representation of array columns --- diff --git a/psycopg3/psycopg3/_column.py b/psycopg3/psycopg3/_column.py index 91fe2ce51..cdc5fbaf9 100644 --- a/psycopg3/psycopg3/_column.py +++ b/psycopg3/psycopg3/_column.py @@ -67,6 +67,9 @@ class Column(Sequence[Any]): parts.append(f", {self.scale}") parts.append(")") + if t and self.type_code == t.array_oid: + parts.append("[]") + return "".join(parts) def __getitem__(self, index: Any) -> Any: