Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOS9r-0006dc-Qx for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2017 17:46:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOS9r-0004TY-18 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2017 17:46:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eOS9q-0004TM-Nq for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2017 17:46:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eOS9o-0001y5-CJ for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2017 17:46:25 +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 vBBHkMlZ016764; Mon, 11 Dec 2017 12:46:22 -0500 From: Tom Lane To: Robert Haas cc: pgsql-hackers@lists.postgresql.org Subject: Re: Inconsistency in plpgsql's error context reports In-reply-to: References: <31545.1512924904@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 11 Dec 2017 12:40:55 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16762.1513014382.1@sss.pgh.pa.us> Date: Mon, 11 Dec 2017 12:46:22 -0500 Message-ID: <16763.1513014382@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Sun, Dec 10, 2017 at 11:55 AM, Tom Lane wrote: >> There seem to be two ways we could look at this. One is that the >> new test case just needs to be rejiggered to avoid unstable output >> ("\set VERBOSITY terse" would be the easiest way). But there is >> also room to argue that it's bad that plpgsql produces error reports >> that vary depending on the phase of the moon, which is pretty much >> what this would look like in the field --- cache flushes will occur >> unpredictably in most application environments. > I am inclined toward the latter view. Yeah, me too. I'll see about patching exec_eval_simple_expr() to provide a context line that matches SPI's. Seems like a HEAD-only change though, as this will result in visible behavior change in the typical case. regards, tom lane