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 1khtvw-0008CH-Ii for psycopg@arkaria.postgresql.org; Wed, 25 Nov 2020 12:30:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1khtvu-000557-NM for psycopg@arkaria.postgresql.org; Wed, 25 Nov 2020 12:30:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khtvu-00054l-Dn for psycopg@lists.postgresql.org; Wed, 25 Nov 2020 12:30:02 +0000 Received: from hl856.dinaserver.com ([82.98.132.60]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khtvn-00044t-9j for psycopg@postgresql.org; Wed, 25 Nov 2020 12:30:01 +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: 632D047E6C1E.A294B X-DinaScanner-Information: DinaScanner. Filtro anti-Spam y anti-Virus Received: from [192.168.2.221] (unknown [185.97.170.249]) (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 632D047E6C1E; Wed, 25 Nov 2020 13:29:46 +0100 (CET) Subject: Re: Adaptation in psycopg3 To: Daniele Varrazzo , psycopg@postgresql.org References: From: listas Message-ID: <7ec5da30-9d28-2bab-7eaa-7038711a99f0@soft-com.es> Date: Wed, 25 Nov 2020 13:29:46 +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 El 24/11/20 a las 17:52, Daniele Varrazzo escribió: > Hello, > > I wrote a description of the psycopg3 adaptation system and the main > differences compared to psycopg2: available at > https://www.psycopg.org/articles/2020/11/24/psycopg3-adaptation/ > > Initial API docs are available at > https://www.psycopg.org/psycopg3/docs/adaptation.html > > Feedback is welcome. Cheers! > > -- Daniele > Hi Daniele, thanks for your effort. After reading the docs i have a question about the parameters in the 'in' clause. In psycopg2 i do: params = (1,2,3,4) cursor.execute("select * from mytable where field1 in %s", (params,)) or params = ('black','red','green') cursor.execute("select * from mytable where field2 in %s", (params,)) What will it be like in psycopg3, will it be the same?, will I have to create a special adapter? Thanks -- Oswaldo Hernández