Re: Integration of Psycopg with XTA

Поиск
Список
Период
Сортировка
От Federico Di Gregorio
Тема Re: Integration of Psycopg with XTA
Дата
Msg-id a1e4995d-d168-ff86-3892-0a77c7e9d5a6@dndg.it
обсуждение исходный текст
Ответ на Re: Integration of Psycopg with XTA  (Christian Ferrari <camauz@yahoo.com>)
Ответы Re: Integration of Psycopg with XTA  (Christian Ferrari <camauz@yahoo.com>)
Список psycopg
On 09/27/2018 09:57 PM, Christian Ferrari wrote:
> Thanks, for the fix, now the function works, but unfortunately it's a 
> dead end in the SWIG realm...Here's the statement: 
> http://www.swig.org/Doc2.0/SWIGDocumentation.html#Python_nn18
> [...]
> *However, the inverse operation is not possible, i.e., you can't build a 
> SWIG pointer object from a raw integer value.*
> [...]
> 
> PyCapsule https://docs.python.org/2/c-api/capsule.html, suggested by 
> Federico seems a more viable approach:
> https://bfroehle.com/2011/07/18/python-capsules/
> 
> If Psycopg was able to retrieve a PyCapsule, XTA should be able to use 
> it and the Python interpreter would be a gateway between two C/C++ 
> distinct modules (Psycopg and XTA).
> I'm going to perform some experiments in the XTA wrapper before coming 
> back to this mail thread.

If you want the capsule, just pull from my report:

https://github.com/fogzot/psycopg2/tree/feature-expose-pgconn

and use the feature-expose-pgconn branch.

federico

-- 
Federico Di Gregorio                         federico.digregorio@dndg.it
DNDG srl                                                  http://dndg.it
  Everything will be OK at the end. If it's not OK, it's not the end.
                                                               -- Unknown


В списке psycopg по дате отправления:

Предыдущее
От: Christian Ferrari
Дата:
Сообщение: Re: Integration of Psycopg with XTA
Следующее
От: Akshay Joshi
Дата:
Сообщение: psycopg2 conn.poll() hangs when used with sshtunnel