Re: Integration of Psycopg with XTA

From: Federico Di Gregorio <fog(at)dndg(dot)it>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: psycopg(at)lists(dot)postgresql(dot)org
Subject: Re: Integration of Psycopg with XTA
Date: 2018-10-03 13:03:52
Message-ID: d5becbaf-2636-fc9c-2c6d-ca42cc914dab@dndg.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 10/03/2018 02:52 PM, Daniele Varrazzo wrote:
> On Wed, Oct 3, 2018 at 1:44 PM Federico Di Gregorio<fog(at)dndg(dot)it> wrote:
>> On 10/03/2018 02:37 PM, Daniele Varrazzo wrote:
>>> On Wed, Oct 3, 2018 at 1:28 PM Federico Di Gregorio<fog(at)dndg(dot)it> 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(dot)digregorio(at)dndg(dot)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@

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Christian Ferrari 2018-10-03 20:50:08 Re: Integration of Psycopg with XTA
Previous Message Daniele Varrazzo 2018-10-03 12:52:43 Re: Integration of Psycopg with XTA