Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tqO20-0042Sz-TT for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Mar 2025 03:05:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tqO1z-001zRT-LE for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Mar 2025 03:05:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tqO1z-001zPZ-BO for pgsql-hackers@lists.postgresql.org; Fri, 07 Mar 2025 03:05:47 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tqO1v-001QJs-2w for pgsql-hackers@lists.postgresql.org; Fri, 07 Mar 2025 03:05:47 +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 52735cOI936269; Thu, 6 Mar 2025 22:05:38 -0500 From: Tom Lane To: Erik Wienhold cc: jian he , Marcos Pegoraro , PostgreSQL Hackers Subject: Re: Add column name to error description In-reply-to: <4b9cff17-103e-4792-98bf-fef46171d7fe@ewie.name> References: <794292.1711912501@sss.pgh.pa.us> <897633.1741294606@sss.pgh.pa.us> <4b9cff17-103e-4792-98bf-fef46171d7fe@ewie.name> Comments: In-reply-to Erik Wienhold message dated "Fri, 07 Mar 2025 02:42:00 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <936267.1741316738.1@sss.pgh.pa.us> Date: Thu, 06 Mar 2025 22:05:38 -0500 Message-ID: <936268.1741316738@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Erik Wienhold writes: > But I don't see the point in keeping variables atttypid and atttypmod > around when those values are now available via outatt. Removing these > two variables makes the code easier to read IMO. Done so in the > attached v4. I think the idea of the original coding was to keep those values in registers in the inner loop rather than re-fetching them each time. But that's probably an unmeasurably microscopic optimization, if real at all (modern compilers might figure it out for themselves). Do others agree Erik's version improves readability? regards, tom lane