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 1mXlUf-0000Y4-2E for pgsql-sql@arkaria.postgresql.org; Tue, 05 Oct 2021 14:32:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXlUd-0006zN-WA for pgsql-sql@arkaria.postgresql.org; Tue, 05 Oct 2021 14:32:32 +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 1mXlUd-0006zF-OT for pgsql-sql@lists.postgresql.org; Tue, 05 Oct 2021 14:32:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXlUX-0003Bt-7f for pgsql-sql@lists.postgresql.org; Tue, 05 Oct 2021 14:32:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 195EWMD74069943; Tue, 5 Oct 2021 10:32:22 -0400 From: Tom Lane To: Shaozhong SHI cc: pgsql-sql Subject: Re: Is it possible to combine the power of Postgres and Python in do statement? In-reply-to: References: Comments: In-reply-to Shaozhong SHI message dated "Tue, 05 Oct 2021 14:05:56 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4069941.1633444342.1@sss.pgh.pa.us> Date: Tue, 05 Oct 2021 10:32:22 -0400 Message-ID: <4069942.1633444342@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Shaozhong SHI writes: > How to combine the power of Postgres and Python is of interest. > Can we do that within a Do statement? DO $$ ... $$ LANGUAGE plpythonu; regards, tom lane