From 40217e2dc73494832119644415b58b490bd316f8 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 12 Jan 2021 22:47:19 +0100 Subject: [PATCH] Added [] in the representation of array columns --- psycopg3/psycopg3/_column.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.47.2