pgsql: Include column name in build_attrmap_by_position's error reports

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Include column name in build_attrmap_by_position's error reports
Date: 2025-03-07 18:24:29
Message-ID: E1tqcN3-001Is5-2Z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Include column name in build_attrmap_by_position's error reports.

Formerly we only provided the column number, but it's frequently
more useful to mention the column name. The input tupdesc often
doesn't have useful column names, but the output tupdesc usually
contains user-supplied names, so report that one.

Author: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Co-authored-by: jian he <jian(dot)universality(at)gmail(dot)com>
Co-authored-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Co-authored-by: Erik Wienhold <ewie(at)ewie(dot)name>
Reviewed-by: Vladlen Popolitov <v(dot)popolitov(at)postgrespro(dot)ru>
Discussion: https://postgr.es/m/CAB-JLwanky28gjAMdnMh1CjyO1b2zLdr6UOA1-oY9G7PVL9KKQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/34c3c5ce1c0b2a27de212076c2e5aaa8e82fac31

Modified Files
--------------
src/backend/access/common/attmap.c | 28 ++++++++++++--------------
src/pl/plpgsql/src/expected/plpgsql_record.out | 26 +++++++++++++++++-------
src/pl/plpgsql/src/sql/plpgsql_record.sql | 8 ++++++++
src/test/regress/expected/plpgsql.out | 2 +-
4 files changed, 41 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-03-07 18:50:46 Re: pgsql: Generalize hash and ordering support in amapi
Previous Message Andres Freund 2025-03-07 18:22:56 pgsql: tests: Fix race condition in postmaster/002_connection_limits