Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vKgz2-0050zL-0u for psycopg@arkaria.postgresql.org; Sun, 16 Nov 2025 17:56:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vKgyy-00B5xm-14 for psycopg@arkaria.postgresql.org; Sun, 16 Nov 2025 17:56:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vKgyy-00B5xH-0Q for psycopg@lists.postgresql.org; Sun, 16 Nov 2025 17:56:12 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vKgys-0084N7-2c for psycopg@lists.postgresql.org; Sun, 16 Nov 2025 17:56:11 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 7D3F27A003F; Sun, 16 Nov 2025 12:56:04 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Sun, 16 Nov 2025 12:56:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1763315764; x=1763402164; bh=tt6SS3jS+qjgDsWYZHCZrtuP0GNXdRZbBRy0zrNPGWM=; b= XTy1MjtK135NjpdnukcKfZAMG+RJCbVENGqnlBuTbqb9DVlmXfdbaiyPZVhNVhZv fGZHyCRmZF8fP53n4wVHvloA3hmZJR9rCmceqoWgjO0qnWcG7IPUVh2JPE1APFTr oOqc1rso2ghQIIu9WEWJFxbiKH7fcrvyOTdnNVc/19WKS4NDyjtLs26o+yR0SxD3 Zwrt0dXU65wzIFu68Xnv1+x4U1P61NxV3mQqAdosIUA82TreQvLAhU+E/Hjqc0OP W3U0+mlAFH5oc3NqzOFW1fULZUfX6s1L8vc6+wS7fmgKpx4oBAKnbHRq+EyyA5Qh yEeP/k5Qbe61aNIuY0OPoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1763315764; x= 1763402164; bh=tt6SS3jS+qjgDsWYZHCZrtuP0GNXdRZbBRy0zrNPGWM=; b=k gWIZQ4UWbFEjyenpRg4Hb+H+UKXVoww5l9ZfH4G30qDf0r71qhwT9XxsT3xpFjXu ag+Un7Imf7hdZ63kLRYWKlLUBI59eY16I648Uyy+bh6Q5dzIUJ6cr68eSUzSKGzR xZUA+zE4FqHyRz89pt4GGR32UkWXQt1TCGfEtwuEkZNvUxoQuAsnywEE0dJaj72G JWn22mEwW+CXdy4BOY4+X7z66cL15edIDz1sLIwjva7dcahu1g4rtFYOYh8LmFPa IqAerhpEZSLEWhNtxnLPHX7ALiM4kiSarC/YIdQNCi+c+P398hFJkNPWN086DGJP d4Dvh/oWNzNSpzqWIU0Gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvudeivdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeekieffgeette duhfehuefflefhgeekfeejffegjefhveettefhteevudehheehhfenucffohhmrghinhep phhshigtohhpghdrohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepgihofhesthhhvggsuhhilhgurdgtohhmpdhrtghpthhtohepphhshigt ohhpgheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 16 Nov 2025 12:56:03 -0500 (EST) Message-ID: <127a78b6-b6f2-4719-8955-ba757704a488@aklaver.com> Date: Sun, 16 Nov 2025 09:56:03 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Overriding default adapters in psycopg To: Christophe Pettus Cc: psycopg@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/16/25 09:43, Christophe Pettus wrote: > > >> On Nov 16, 2025, at 09:30, Adrian Klaver 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(, 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.klaver@aklaver.com