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 1lCSyM-00045N-F0 for pgsql-docs@arkaria.postgresql.org; Wed, 17 Feb 2021 19:58:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCSyL-0004Jd-DD for pgsql-docs@arkaria.postgresql.org; Wed, 17 Feb 2021 19:58:53 +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 1lCSyL-0004JW-7T for pgsql-docs@lists.postgresql.org; Wed, 17 Feb 2021 19:58:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCSyI-0006JE-Sf for pgsql-docs@lists.postgresql.org; Wed, 17 Feb 2021 19:58:52 +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 11HJwl1r2743964; Wed, 17 Feb 2021 14:58:47 -0500 From: Tom Lane To: "Euler Taveira" cc: arturocuya099@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: =?UTF-8?Q?Re:_About_the_return_states_of_SPI=5Fexecute_for_plpy.execute(?= =?UTF-8?Q?).status()?= In-reply-to: References: <161340270933.3462.11448419214943107350@wrigleys.postgresql.org> Comments: In-reply-to "Euler Taveira" message dated "Wed, 17 Feb 2021 16:43:58 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2743962.1613591927.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 17 Feb 2021 14:58:47 -0500 Message-ID: <2743963.1613591927@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Euler Taveira" writes: > It is referring to the SPI_execute() return values [1] whose mapped inte= gers = > are available in [2]. 11 refers to INSERT ... RETURNING. Maybe PL/Python= should > expose these SPI constants too (if it doesn't). I wouldn't be in too much of a hurry to do that, because there's been repeated discussion of removing (or at least obsoleting) most of those codes in favor of throwing regular errors for the cases that represent error conditions. Better to wait to change plpython until after that dust settles. regards, tom lane