Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g7geD-000188-7a for psycopg@arkaria.postgresql.org; Wed, 03 Oct 2018 12:53:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g7geB-0002Eh-KN for psycopg@arkaria.postgresql.org; Wed, 03 Oct 2018 12:52:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g7geB-0002EZ-CH for psycopg@lists.postgresql.org; Wed, 03 Oct 2018 12:52:59 +0000 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g7ge8-0000sA-Oq for psycopg@lists.postgresql.org; Wed, 03 Oct 2018 12:52:58 +0000 Received: by mail-lj1-x243.google.com with SMTP id z21-v6so5004943ljz.0 for ; Wed, 03 Oct 2018 05:52:56 -0700 (PDT) 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 :cc; bh=YgA/+4zcGEFoHu7dSd8PBZB+ZD6mso3A94JECtaqhVs=; b=cMFxybxU4vIzQJRiGmAA2McKOJh8YSv4uVgYeIBW6ByJvFp2t4ElKfBLPAVQrCHgkv b2OMgVVaG8LFwZw3I8R0+n36HBvo0r634jQKBnZkgKFttp9aPgwpOH58p/+jjsXOmrPM 8h23d/5kKPfal/iu4di7z5IICHgaAxXbUwguzp6LBlvn1ZkDRSKw6biKJ1d3gdwloWMa 6omSTa+mThLx0zZmlSYVLRHYrGYcvckZVWqWYTJuuEYq+q75TC0lcf5AWio9lHvOosCI W/lsnSxAV8mZLXNo6T5LA9YyAMtT2WO7d6O1WAkECPDAvB2lX81dPCNEDD7Y0Lpo1R3J ddew== 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:cc; bh=YgA/+4zcGEFoHu7dSd8PBZB+ZD6mso3A94JECtaqhVs=; b=Cthoir5YStwzZbBbUa/dRXdRViJedZNiLc1KhT8P9uzPtSpIg89MJ7biXas9C/Qog5 zabYxNDlC0LN2wN482svJNKegQCNCgJpWcuYH6fKpr5Vf7MLV3b9nU4I6y+lppCqm0Dn n12HNwvgfGqkokx4HOyeNh3stcEhV4EVqAJaivMy9neLe0KdWD8UJe8Y9eA0pCOT3vDI yz59Lqgm4gzNbYmoLQmfGvnyOJR9Tb3FT0SQKccg4vxsQUchqH9Dw0ngzKWM6E1xC3lJ U75Q8QflOQdleUSvB8bZ09MH2yaflYajYkmKOvpXs+oPM753i6vPBpW+nOTjTFklgx5v iW/g== X-Gm-Message-State: ABuFfog4myYkmskkdxN7dsy86td0tb36N7CrBVqUym3N0bPSzFSGR6qE rPxYLQSN1ekkFGPMZaQ1YeMCQeGS+UQ5Zjd0KlPu9g== X-Google-Smtp-Source: ACcGV61Y1df+oD9xZKKU4w5/pOYH5KuON92SdLn+8AEveMNFQzgwxqNNwXOWUrym2Qxp4bTpngJ+hAbpuwsKUP5KRJo= X-Received: by 2002:a2e:1615:: with SMTP id w21-v6mr1068167ljd.33.1538571173976; Wed, 03 Oct 2018 05:52:53 -0700 (PDT) MIME-Version: 1.0 References: <2001056273.7945904.1537909025251.ref@mail.yahoo.com> <2001056273.7945904.1537909025251@mail.yahoo.com> <1171000727.19526618.1537994198139@mail.yahoo.com> <2038369023.20583382.1538078255866@mail.yahoo.com> <106450562.4254785.1538510870700@mail.yahoo.com> <4d647279-19ae-75ea-83a7-b74b647c79bd@dndg.it> In-Reply-To: From: Daniele Varrazzo Date: Wed, 3 Oct 2018 13:52:43 +0100 Message-ID: Subject: Re: Integration of Psycopg with XTA To: Federico Di Gregorio Cc: psycopg@lists.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, Oct 3, 2018 at 1:44 PM Federico Di Gregorio wrote: > > On 10/03/2018 02:37 PM, Daniele Varrazzo wrote: > > On Wed, Oct 3, 2018 at 1:28 PM Federico Di Gregorio wrote: > > > >>> This is interesting because PyCapsule is for sure a "clean" way to pass > >>> the pointer from Psycopg to XTA. > > Fog, maybe it's worth adding the capsules for PGconn and PGresult to > > the objects interface and document them? Can do that for psycopg 2.8. > > If it works I'd add it (and document it as an "internal" extension point > used by other C-level modules) for 2.8, yes. > > By PGresult you mean adding it on the cursor, or the connection? Yes, i'd say a _pgconn attribute or _get_pgconn() method on the connection, a _pgresult thing on the cursor. By the way a read-only attribute as per your implementation seems appropriate to me. Christian, why do you think a function would be better? -- Daniele