| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Christophe Pettus <xof(at)thebuild(dot)com> |
| Cc: | psycopg(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Overriding default adapters in psycopg |
| Date: | 2025-11-16 17:56:03 |
| Message-ID: | 127a78b6-b6f2-4719-8955-ba757704a488@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | psycopg |
On 11/16/25 09:43, Christophe Pettus wrote:
>
>
>> On Nov 16, 2025, at 09:30, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>>
>> https://www.psycopg.org/psycopg3/docs/api/abc.html#psycopg.abc.Dumper.dump
>>
>> I believe it should be something like:
>>
>> psycopg.adapters.register_dumper(<some_python_object>, CyanJSONBDumper)
>
> Thank you!
I tried my original suggestion of using:
https://www.psycopg.org/psycopg3/docs/basic/adapt.html#adapt-json
and it seems to work.
Which this issue:
https://github.com/psycopg/psycopg/pull/568
confirms should be the case.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniele Varrazzo | 2025-12-01 12:02:01 | Psycopg 3.3 released |
| Previous Message | Christophe Pettus | 2025-11-16 17:43:06 | Re: Overriding default adapters in psycopg |