pg.ddx.io  psycopg/psycopg GitHub issues and pull requests  
help / color / mirror / Atom feed
From: jerch (@jerch) <noreply+jerch@github.com>
To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>
Subject: Re: [psycopg/psycopg] issue #1157: proposal: retrieve range value dumper from inner_oid setting
Date: Fri, 17 Oct 2025 14:28:38 +0000
Message-ID: <gh-psycopg-psycopg-1157-c3415839891@github.com> (raw)
In-Reply-To: <gh-psycopg-psycopg-1157@github.com>
References: <gh-psycopg-psycopg-1157@github.com>

@dvarrazzo Tests are now passing 😅  - so it would be nice if you find some time to have a look.

I did not implement a full `CDumper` with a `cdump` function for range types yet, as this looks pretty involved for their "dynamics", instead the `dump` function in python resorts to the c function for now. A full `CDumper.cdump` impl would be ideal to also make use of the inplace bytearray writing (not sure yet if it is worth the hassle, as this is already ~3 times faster). Just let me know, if you would want a more complete impl (also the code currently resides in the wrong place 😅).

And if you wonder, why I mixed `get_dumper_by_oid` idea with a c dump impl in the first place - because `get_dumper_by_oid` is cdef'ed in cython, so not directly available from python.

From range dumper side the changes are as follows - if the dumper has an `_inner_oid` attribute set, this gets used for binary value dumping, otherwise the old logic kicks in.

view thread (16+ messages)  latest in thread

Message-ID: <gh-psycopg-psycopg-1157-c3415839891@github.com>
Permalink:  ../gh-psycopg-psycopg-1157-c3415839891@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox