On Tue, 5 Oct 2021 at 13:30, Paolo De Stefani <paolo@paolodestefani.it> wrote:
> class TimestamptzQDateTimeLoader(Loader):
> def load(self, value):
> if value is None:
> return None
A `None` will never make it here: you can drop this check in psycopg 3.
> BUT it's not working because the "value" is binary not string:
>
> <memory at 0x000000000939BA00>
>
> So how i can get the same result of psycopg2 in psycopg3 ?
You can use bytes(value) to get the value as bytes string, and if you
need a str you can use bytes(value).decode()
-- Daniele