Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX6ec-0002dk-0T for psycopg@arkaria.postgresql.org; Sun, 03 Oct 2021 18:56:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mX6eb-0003ek-0i for psycopg@arkaria.postgresql.org; Sun, 03 Oct 2021 18:56:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX6ea-0003dL-R9 for psycopg@lists.postgresql.org; Sun, 03 Oct 2021 18:56:04 +0000 Received: from mail-vs1-xe31.google.com ([2607:f8b0:4864:20::e31]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mX6eX-0006Cl-Gy for psycopg@postgresql.org; Sun, 03 Oct 2021 18:56:04 +0000 Received: by mail-vs1-xe31.google.com with SMTP id g10so2677240vsb.8 for ; Sun, 03 Oct 2021 11:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=saY+nAbSeZhRDyJ+oeuM72WQ9/7FBnpdxY5/mhz1jrc=; b=dVgSulDndmVRm9BHnVmiyoG4VCmt6QVhLjFLy8J0SSOvl5f1IKyeNbFL5kklvgyXLi saGHpfyxE1JfIdM+04VPYG4x7QHWS+Qkh/k6ytB4z3E3enRtIaymWslQzEUiEKIOs5Wz zG7I6+A5t9t9KLStcwpQeDdnKRANlFCNiQ+FAO+shIiozS6FXKlhXmkm5umcAYix5Yhr bU6YSpb4R0oX89Qu03t8ASnnpy82hsmJcX2Da68LI8eOOVArrjtuCw36OHoE6m34saca jdVDUkFqjpsWd9JWbWkI2vV405wJrhd3RBxQJ5LeqP81UNcPFV9+no/Ra2PAgzNzpFVG lEVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=saY+nAbSeZhRDyJ+oeuM72WQ9/7FBnpdxY5/mhz1jrc=; b=U/9qK55ZrQMHEoIwXIYfvxuglU43Q+YItpZlaXVHBmqVWYlgnNxtjtWdZR4UOCzWfN H2OsaB+0GAfhn2o/iKCpuaY6eXTDrLnw0QS8pAiJfRtXWp7CO9cn4ueYjD6B87Fu1FlK EVjQlzOEqy+jnV5Msyt9R7x8ooBtMqhogufkTTyklgnuVCi3UPURO3+9m1dXZjCDbEXX 35iWDkUQzAp/hSM1IH2psOkc2NDpJ8PsJum5mBuEt4Vgiy33MJZ6yaDzoQCd5hhdgZjj 4+qJbsOvJfe2Ts0ipqVOW0Rl1cx1c/cZIGA4vV5PcsX84K6IlDReJtTQbpjEWT8fDYPN RIRg== X-Gm-Message-State: AOAM53308VWIpTv2lcBI9ZlkoWgQDFHtFLP0/JtSmEnoB4KXD698jA6R V/SXtRo1qQE9xLALYEGStuK9zVTvitEk4uBSxTc= X-Google-Smtp-Source: ABdhPJza7CehutsruhRpdMixewFOWv4Nh8bsbd8aj8BlZ3zOEkMsRv8kSnXhqHMX7jgk/ETj0Ze5OlZKPmox4ZVft0E= X-Received: by 2002:a05:6102:3bc1:: with SMTP id a1mr1650154vsv.16.1633287358847; Sun, 03 Oct 2021 11:55:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daniele Varrazzo Date: Sun, 3 Oct 2021 20:55:47 +0200 Message-ID: Subject: Re: psycopg3 and cur.description behavior To: Paolo De Stefani Cc: psycopg@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 3 Oct 2021 at 18:35, Paolo De Stefani 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