Subject: bug in handling Postgres bytea type?

From: Christopher Bader <[email-masked]>
Date: Thu, 22 Dec 2022 21:53:43 -0500

I'm having problems reading bytea fields with psycopg2.

Reading a bytea field with cursor.fetchall yields a memoryview object, not
a bytes or bytearray object, and even when the object is explicitly
converted to bytes or bytearray, the result is not correct.

Christopher Bader
Staff Data Scientist
Zscaler

---

From: Daniele Varrazzo <[email-masked]>
Date: Fri, 23 Dec 2022 02:58:21 +0000

> converted to bytes or bytearray, the result is not correct.

Define not correct.