Re: bug in handling Postgres bytea type?

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Christopher Bader <cbader(at)zscaler(dot)com>
Cc: psycopg(at)lists(dot)postgresql(dot)org
Subject: Re: bug in handling Postgres bytea type?
Date: 2022-12-23 02:58:21
Message-ID: CA+mi_8a8mixwEsxaNhpeEOmrH1_Xc2vqCU=uEz0M-RSC8pfo1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Fri, 23 Dec 2022 at 02:54, Christopher Bader <cbader(at)zscaler(dot)com> wrote:

> 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.
>

Define not correct.

In response to

Browse psycopg by date

  From Date Subject
Next Message Samuel Marks 2023-02-21 04:34:19 Escape Python to `json[]` for `COPY FROM` PostgreSQL insertion?
Previous Message Christopher Bader 2022-12-23 02:53:43 bug in handling Postgres bytea type?