Re: Adding an informative object to the connection

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Adding an informative object to the connection
Date: 2018-10-15 05:29:11
Message-ID: CAKKotZQS=cB5nHpKhXEY7nK7hfKhymqrL_f26sjy80Gj0bx+TA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

+1

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Oct 12, 2018 at 10:16 PM Daniele Varrazzo <
daniele(dot)varrazzo(at)gmail(dot)com> wrote:

> Hi,
>
> a few days ago we were contributed a merge request for an `.host`
> attribute on the connection. But looking back at the bug
> (https://github.com/psycopg/psycopg2/issues/726) I had already noticed
> there are other interesting informative connection functions in the
> libpq. Some of them are already exposed as methods of the connection
> class (e.g. get_backend_pid(), get_transaction_status() etc), but I
> can see a trickle of requests for others, so I'd rather expose
> most/all of them.
>
> Instead of bloating the connection class with more and more attributes
> and methods, I'm rather adding a connection.info method to retrieve
> pgconn-specific information. The work is happening in this branch:
>
> https://github.com/psycopg/psycopg2/commits/connection-info
>
> I would softly deprecate the currently exposed informative methods:
> not sending them away in a short time but giving a preference to use
> from the 'info' object what belongs to the pgconn/libpq and to leave
> on the connection things regarding the Python layer, and clean up the
> interfaces a little bit.
>
> Any input is welcome. Cheers!
>
> -- Daniele
>
>

In response to

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2018-10-15 11:48:04 Feature branches merged to master for 2.8 release
Previous Message Marco De Paoli 2018-10-12 20:53:04 Re: Adding an informative object to the connection