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 1kmcrG-0006M4-BJ for psycopg@arkaria.postgresql.org; Tue, 08 Dec 2020 13:16:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kmcrE-0002Ns-Lg for psycopg@arkaria.postgresql.org; Tue, 08 Dec 2020 13:16:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmcrE-0002Nj-EN for psycopg@lists.postgresql.org; Tue, 08 Dec 2020 13:16:44 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kmcr8-0007FY-0A for psycopg@postgresql.org; Tue, 08 Dec 2020 13:16:43 +0000 Received: by mail-lf1-x12a.google.com with SMTP id m19so3230195lfb.1 for ; Tue, 08 Dec 2020 05:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oPUiT/pbNBZ8JWwKYadiGtyP//a2mugeah3UY45Gbek=; b=pu1PnaeeZBnliDJ5M8KbbA26oiTrdYBO9eAuNN4T0Lzs/M/FDK8kL3K4pqs/dCABn/ +8KW53mYGrAXj/DMhmHqZGe/pigsukoQ3dIyOWp6LFHKB2sRuXfJtI70cHIIcY/7A1U/ FDnTIn8ePB4kPr3WshrCd9nHIMNm+qFAnfDcLV9uTACVURAhQDr7zJCGNa7MQd2Un6en WzyybJzxDMc7BMbTorHCAx8yQpys2jejeNl2ArDp+q2WDh7fitW37N8se0NntCfAxyKx p98FoqNDQRuuwP+qYAozsIGqIoAg3FnZ5CnI/E8j8W+9HWQYiNX+ftnn4u7BEg+nN9T3 z0cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=oPUiT/pbNBZ8JWwKYadiGtyP//a2mugeah3UY45Gbek=; b=H6iYPOaZEkdUs4yuBWgyVAYa0OBlfBM8ijBR/RhP3AXMBCia9lU6loQDAtjZz9stpj X+XUblg3pSMsaHP03UGssis/KGZtDZYJEguCuh/rTRltI4BNts8VLQaaimFWdLdTqpQx cyZp/NMvxvW1BqvQQ9m0KCBr6a/GoU+P1fo0S4LJs02m4LkLt2xQLMAi755xvTk5yw4W xlrbOCVJY+GKaivO1/n4P/dXYICeS08ZyqD0XPskqfDLGx3g/FAaYo6tg1ff9jZdkTTn bU0+AIYJtYxbpmvecGSUXatrbyn7F2w1ibN5VjW2pSmClN4p+vQdlustBc7LJ78rBPXE eqUg== X-Gm-Message-State: AOAM531YUfMFyF5272ZAmMm11Iy9JyAFD/b+ovjzDIEkpMsGdV9shpBE xlfAJNnStosBC3CP/OqRh7TqhcRRMFEZ849deSlckYklOgMcVg== X-Google-Smtp-Source: ABdhPJwJGgljIrqqSLdLdKqxcEbNqLt8Qni9flYBLi4wpnavibKodgQ3Z269CoMF3BCrbFnfBGVfqLLpqVfjmVPRlA4= X-Received: by 2002:ac2:5a0b:: with SMTP id q11mr3374630lfn.37.1607433396142; Tue, 08 Dec 2020 05:16:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Daniele Varrazzo Date: Tue, 8 Dec 2020 13:16:24 +0000 Message-ID: Subject: Re: Executing on the connection? To: psycopg@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 2 Dec 2020 at 11:20, Daniele Varrazzo wrote: > I'm toying with the idea of adding a 'connection.execute(query, > [params])' methd, which would basically just create a cursor > internally, query on it, and return it. No parameter could be passed > to the cursor() call, so it could only create the most standard, > client-side cursor (or whatever the default for the connection is, if > there is some form of cursor_factory, which hasn't been implemented in > psycopg3 yet). For anything more fancy, cursor() should be called > explicitly. This is what I've pushed earlier: https://www.psycopg.org/psycopg3/docs/connection.html#psycopg3.Connection.execute Feedback is welcome. Cheers! -- Daniele