Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goIaV-0004M2-8a for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Jan 2019 01:53:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goIaU-0005sW-3g for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Jan 2019 01:53:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goIaT-0005sI-Ni for pgsql-hackers@lists.postgresql.org; Tue, 29 Jan 2019 01:53:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goIaR-0004Ac-2i for pgsql-hackers@postgresql.org; Tue, 29 Jan 2019 01:53:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0T1r3hD002110; Mon, 28 Jan 2019 20:53:03 -0500 From: Tom Lane To: Alexander Korotkov cc: Andres Freund , Nikita Glukhov , Tomas Vondra , Oleg Bartunov , Michael Paquier , Stas Kelvich , PostgreSQL-development , Thomas Munro , David Steele , Andrew Dunstan , Robert Haas , Pavel Stehule Subject: Re: jsonpath In-reply-to: References: <264a6413-7175-9680-b976-d50392c001c0@postgrespro.ru> <9f5f1247-29f4-17cd-edd9-38e9bcd95b14@postgrespro.ru> <20190129010332.i4t64evqc3bwtjzx@alap3.anarazel.de> Comments: In-reply-to Alexander Korotkov message dated "Tue, 29 Jan 2019 04:30:31 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2108.1548726783.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 28 Jan 2019 20:53:03 -0500 Message-ID: <2109.1548726783@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexander Korotkov writes: > + if (jspThrowErrors(cxt) || > + ERRCODE_TO_CATEGORY(errcode) !=3D ERRCODE_DATA_EXC= EPTION) > + PG_RE_THROW(); > BTW, this code also looks... useless. I can't see whole numeric.c > throwing ERRCODE_DATA_EXCEPTION. Nikita, what do we mean here? I think what this code is claiming is that any errcode in the 22xxx category is safe to trap. Presumably what it's expecting to see is ERRCODE_DIVISION_BY_ZERO (22012) or another error that numeric.c could throw ... but 22xxx covers a heck of a lot of ground. regards, tom lane