Re: psycopg3 and adaptation choices
От | Daniele Varrazzo |
---|---|
Тема | Re: psycopg3 and adaptation choices |
Дата | |
Msg-id | CA+mi_8adFSjjE6hHrccKzt7YWKmB4PybtRLOp2k_ms9YD0v6SA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: psycopg3 and adaptation choices (Christophe Pettus <xof@thebuild.com>) |
Список | psycopg |
On Tue, 10 Nov 2020 at 03:20, Christophe Pettus <xof@thebuild.com> wrote: > > I don't want to derail this, but a question: Can a connection be set to use the simple-query protocol instead of the extended-queryprotocol in 3? It won't be set explicitly to use simple/extended protocol, but if a query is passed with no parameter (because it just has no variable part, or because it's being composed client-side using functionalities similar to psycopg2.sql) then the simple-query protocol is used [1]. This is mostly useful to pass several queries at once, because the extended query protocol doesn't allow more than one query at time [2]. [1] https://github.com/psycopg/psycopg3/blob/bc02ae1c9c42892966ff079250c24ff5eae28b48/psycopg3/psycopg3/cursor.py#L243-L254 [2] https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-PQEXECPARAMS -- Daniele
В списке psycopg по дате отправления: