Re: Add column name to error description

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Wienhold <ewie@ewie.name>
Cc: jian he <jian.universality@gmail.com>, Marcos Pegoraro <marcos@f10.com.br>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-07T03:57:45Z
Lists: pgsql-hackers
Erik Wienhold <ewie@ewie.name> writes:
> On 2025-03-07 04:05 +0100, Tom Lane wrote:
>> 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.

> Could be.  But the main reason was to hold the output column type as the
> inner loop repurposed att for the input column.

[ shrug... ]  "git blame" traces this code to my commit 12b1b5d83
of 2004-12-11.  I admit that my memory might be faulty 20 years later,
but that's my impression of what I was thinking.

			regards, tom lane



Commits

  1. Include column name in build_attrmap_by_position's error reports.

  2. Instead of supposing (wrongly, in the general case) that the rowtype