Daniele Varrazzo <daniele.varra...@gmail.com> added the comment:

FYI, will try to use this API in psycopg3, which supports the PostgreSQL 
decimal binary format. Thank you very much: it seems exactly what needed.

Binary conversion with Python Decimal currently has disappointing performances 
and is slower than the text format conversion. This is likely caused by the use 
of Decimal.as_tuple(), which creates tuples for the return value and the digits 
and requires Python calls to access their values.

I have considered using libmpdec directly: personally I wouldn't be opposed to 
that, but the additional dependency on libmpdec-dev would earn the project no 
new fan :\

Ref. https://github.com/psycopg/psycopg3/issues/54

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41324>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to