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 1pjhW4-00046w-Bj for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 14:20:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pjhW2-0000ox-Jf for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 14:20:06 +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 1pjhW2-0000om-9x for pgsql-hackers@lists.postgresql.org; Tue, 04 Apr 2023 14:20:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pjhVz-000qUQ-Id for pgsql-hackers@lists.postgresql.org; Tue, 04 Apr 2023 14:20:05 +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 334EK0dv1467102; Tue, 4 Apr 2023 10:20:00 -0400 From: Tom Lane To: Pavel Stehule cc: Kirk Wolak , Julien Rouhaud , PostgreSQL Hackers Subject: Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID In-reply-to: References: <20230208063316.atjv6uxb7owm77s6@jrouhaud> <1244928.1680543451@sss.pgh.pa.us> Comments: In-reply-to Pavel Stehule message dated "Mon, 03 Apr 2023 20:49:35 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1467100.1680618000.1@sss.pgh.pa.us> Date: Tue, 04 Apr 2023 10:20:00 -0400 Message-ID: <1467101.1680618000@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > There is reduced patch + regress tests One more thing: I do not think it's appropriate to allow this in GET STACKED DIAGNOSTICS. That's about reporting the place where an error occurred, not the current location. Eventually it might be interesting to retrieve the OID of the function that contained the error, but that would be a pretty complicated patch and I am not sure it's worth it. In the meantime I think we should just forbid it. If we do that, then the confusion you were concerned about upthread goes away and we could shorten the keyword back down to "pg_routine_oid", which seems like a good thing for our carpal tunnels. Thoughts? regards, tom lane