public inbox for [email protected]
help / color / mirror / Atom feedFrom: Christian Ferrari <[email protected]>
To: [email protected]
Subject: Re: Integration of Psycopg with XTA
Date: Fri, 5 Oct 2018 16:02:58 +0000 (UTC)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
In a previous mail I stated something like "the name of the method doesn't matter"...... after better thinking I realized a decent name might be better than other ones...Let me say:
get_native_conn()get_native_connection()
might be better than "get_something_pgconn" because the same type of method could be useful for other databases in the future...More or less all the databases use a "native connection", only PostgreSQL uses "PGconn connection".
Have a good w.e.Ch.F.
-------------------------------------------------------------
Good design can't stop bad implementation
Il giovedì 4 ottobre 2018, 12:36:53 CEST, Federico Di Gregorio <[email protected]> ha scritto:
On 10/04/2018 12:30 PM, Daniele Varrazzo wrote:
> On Thu, Oct 4, 2018 at 11:24 AM Federico Di Gregorio<[email protected]> wrote:
>> On 10/04/2018 12:13 PM, Daniele Varrazzo wrote:
>>> On Thu, Oct 4, 2018 at 10:33 AM Federico Di Gregorio<[email protected]>
wrote:
>>>> @Daniele, I see that a capsule has an implicit state, "invalid" if the
>>>> pointer inside it is null. Does it makes sense to reuse the same
capsule
>>>> and keep a reference to it to be able to invalidate it when the
>>>> connection is closed?
>>> I can take a look at it but I suspect it's a lot of work for a feature
>>> very rarely used.
>> Nah, I can do it. I was just asking for your opinion. :D
> I don't know much about the capsule object, its life cycle etc. Yes,
> not a huge deal saving it in the connection state and returning always
> the same. I just wonder if it's worth the effort.
I suppose it helps to debug the situation where the capsule is used
after the connection has been closed. Instead of a BOOM you get a nice
exception (if the consumer checks for it, obviously).
I'll work on this in my repo and if everything works we can integrate it
for 2.8.
federico
--
Federico Di Gregorio [email protected]
DNDG srl http://dndg.it
Gli avvoltoi cinesi si nutrono di arte, ma possono anche mangiare
i `domani'. -- Haruki Murakami
view thread (22+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Integration of Psycopg with XTA
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox