MagicStack / asyncpg

A fast PostgreSQL Database Client Library for Python/asyncio.
Apache License 2.0
6.99k stars 404 forks source link

Decimal("Infinity") support for numeric types in PostgreSql >= 14? #1020

Closed krokoziabla closed 1 year ago

krokoziabla commented 1 year ago

It looks like this branch is no longer completely valid

https://github.com/MagicStack/py-pgproto/blob/a4178145cd7cc3a44eee20cfc9e8b94a7fed2053/codecs/numeric.pyx#L55

elprans commented 1 year ago

Yeah, that's a good point. A PR would be welcome, as I'm completely swamped with other work right now.

krokoziabla commented 1 year ago

Hi again! I've made a PR in the submodule which basically makes it possible to handle Infinite decimals. https://github.com/MagicStack/py-pgproto/pull/22/files But it misses server's version check. Probably you can give me a hint or existing example how to check it properly

Also after it has been merged I will submit another PR to the parent repo with tests that checks this new feature

elprans commented 1 year ago

Fixed in #1067