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 1g7gor-0001it-Na for psycopg@arkaria.postgresql.org; Wed, 03 Oct 2018 13:04: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 1g7goo-0000IV-IM for psycopg@arkaria.postgresql.org; Wed, 03 Oct 2018 13:03:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g7goo-0000IH-Cn for psycopg@lists.postgresql.org; Wed, 03 Oct 2018 13:03:58 +0000 Received: from mail.dndg.it ([178.32.136.2]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g7gol-0006AK-GZ for psycopg@lists.postgresql.org; Wed, 03 Oct 2018 13:03:57 +0000 Received: from [10.94.33.108] (93-50-194-114.ip153.fastwebnet.it [93.50.194.114]) by mail.dndg.it (Postfix) with ESMTPSA id 43F0CA02E0; Wed, 3 Oct 2018 13:09:15 +0000 (UTC) Subject: Re: Integration of Psycopg with XTA To: Daniele Varrazzo Cc: psycopg@lists.postgresql.org 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> From: Federico Di Gregorio Organization: DNDG srl Message-ID: Date: Wed, 3 Oct 2018 15:03:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SURBL_BLOCKED, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/03/2018 02:52 PM, Daniele Varrazzo wrote: > 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? I guess the capsule is meant to be consumed by the other API and using a method makes is explicit that a new object is instantiated every time. I really don't care about this, let's do whatever is more Pythonic. federico -- Federico Di Gregorio federico.digregorio@dndg.it DNDG srl http://dndg.it I did appreciate the irony that I was whining about encoding issues on a mailing list that was unable to show those chars, too. -- Antti S. Lankila to mono-devel-list@