Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki13C-0001RM-Oy for psycopg@arkaria.postgresql.org; Wed, 25 Nov 2020 20:06:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ki13B-0002gq-Jr for psycopg@arkaria.postgresql.org; Wed, 25 Nov 2020 20:06:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki13B-0002gj-EM for psycopg@lists.postgresql.org; Wed, 25 Nov 2020 20:06:01 +0000 Received: from hl856.dinaserver.com ([82.98.132.60]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki139-0001cG-6U for psycopg@postgresql.org; Wed, 25 Nov 2020 20:06:00 +0000 X-Spam-Status: No X-DinaScanner-From: listas@soft-com.es X-DinaScanner-SpamCheck: no es spam, SpamAssassin (no almacenado, puntaje=0.8, requerido 6, autolearn=disabled, ALL_TRUSTED -1.00, BAYES_50 1.80) X-DinaScanner: Libre de Virus X-DinaScanner-ID: 605A047E6BEE.A19B3 X-DinaScanner-Information: DinaScanner. Filtro anti-Spam y anti-Virus Received: from [192.168.0.103] (unknown [188.215.11.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: oswaldo@soft-com.es) by hl856.dinaserver.com (Postfix) with ESMTPSA id 605A047E6BEE; Wed, 25 Nov 2020 21:05:51 +0100 (CET) Subject: Re: Adaptation in psycopg3 To: Daniele Varrazzo Cc: psycopg@postgresql.org References: <7ec5da30-9d28-2bab-7eaa-7038711a99f0@soft-com.es> <9d1b2ad5-37a3-ebce-a622-24c6a1f5e1b4@soft-com.es> From: listas Message-ID: <177f76e2-00a0-a262-cc68-82d7c859e573@soft-com.es> Date: Wed, 25 Nov 2020 21:05:50 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ... > > What you would do, both in psycopg2 and 3, would be something like: > > cursor.execute("update mytable set jsfield=%s where id = any(%s)", > (Json(data), idList)) > > Code like this should work in both versions. > perfect :) thank you very much -- Oswaldo Hernández