public inbox for [email protected]
help / color / mirror / Atom feedFrom: Daniele Varrazzo <[email protected]>
To: Paolo De Stefani <[email protected]>
Cc: [email protected]
Subject: Re: psycopg3 and cur.description behavior
Date: Sun, 3 Oct 2021 20:55:47 +0200
Message-ID: <CA+mi_8bDaC10m4Bv5-huM_8Gajs-_4eX5VwMPy-L6XdatxRuKQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CA+mi_8YCUBfOD9vx1kx4PBt9Lc2PD8DQzT4mPqjx8nhMNWufXQ@mail.gmail.com>
<[email protected]>
On Sun, 3 Oct 2021 at 18:35, Paolo De Stefani <[email protected]> wrote:
> By the way i didn't see any cur.mogrify() in psycopg 3 and no logging
> cursor as well something i used frequently
> Are they no more available ? Any plan to include them in next versions ?
There is no mogrify, no, because queries are not composed by the
client anymore, but they are sent to the server separately from the
arguments. Mogrify would be misleading because the same query might
behave differently if parameters are merged by the server or by the
client.
The logging cursor, I don't think should exist as an option: the
logging system itself has the option of being enabled or disabled. So,
if any, I think psycopg should log every query, let's say at info
level, which would normally be discarded, unless the user enables it
with a getLogger("psycopg").setLevel(logging.INFO). However that's not
in, because I have a fear (but not a measure) that it would add some
overhead. Which is totally premature optimisation, I am aware.
Maybe someone would like to help and get some measurement of how much
overhead does logging add? Comparing no logging/disabled
logging/enabled logging?
Cheers
-- Daniele
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: psycopg3 and cur.description behavior
In-Reply-To: <CA+mi_8bDaC10m4Bv5-huM_8Gajs-_4eX5VwMPy-L6XdatxRuKQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox