Re: psycopg3 and adaptation choices - Mailing list psycopg

From Daniele Varrazzo
Subject Re: psycopg3 and adaptation choices
Date
Msg-id CA+mi_8aWb9avqTtm=MZcNzUVvKvvWYS7BzcuCapgA9wnNFRyGQ@mail.gmail.com
Whole thread Raw
In response to Re: psycopg3 and adaptation choices  (Christophe Pettus <xof@thebuild.com>)
Responses Re: psycopg3 and adaptation choices  (Vladimir Ryabtsev <greatvovan@gmail.com>)
Re: psycopg3 and adaptation choices  (Rory Campbell-Lange <rory@campbell-lange.net>)
List psycopg
On Tue, 10 Nov 2020 at 03:22, Christophe Pettus <xof@thebuild.com> wrote:
>
> > On Nov 9, 2020, at 19:20, Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
> >
> >    Choices to cast Python ``int`` type:
>
> Is it absurd to make the choice at execution time, based on the actual value of the Python int?

I've been thinking a lot about it. I haven't completely ruled it out,
but there are a few cases in which having different oids for the same
query gets in the way. One that comes to mind is with prepared
statements, either explicit (which I haven't exposed yet, but it's
like the #1 request for a new feature), or implicit (currently using
them to implement 'executemany()'). However I might be overestimating
these issues, yes.

I guess I should give an overview of the whole adaptation system: I'll
try and write its documentation in the next few days. I have to start
with the documentation somewhere...

-- Daniele



psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: psycopg3 and adaptation choices
Next
From: Daniele Varrazzo
Date:
Subject: psycopg is the new psycopg3?