mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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@f10.com.br> Co-authored-by: jian he <jian.universality@gmail.com> Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us> Co-authored-by: Erik Wienhold <ewie@ewie.name> Reviewed-by: Vladlen Popolitov <v.popolitov@postgrespro.ru> Discussion: https://postgr.es/m/CAB-JLwanky28gjAMdnMh1CjyO1b2zLdr6UOA1-oY9G7PVL9KKQ@mail.gmail.com
This commit is contained in:
@@ -3779,7 +3779,7 @@ end;
|
||||
$$ language plpgsql;
|
||||
select compos();
|
||||
ERROR: returned record type does not match expected record type
|
||||
DETAIL: Returned type unknown does not match expected type character varying in column 2.
|
||||
DETAIL: Returned type unknown does not match expected type character varying in column "y" (position 2).
|
||||
CONTEXT: PL/pgSQL function compos() while casting return value to function's return type
|
||||
-- ... but this does
|
||||
create or replace function compos() returns compostype as $$
|
||||
|
||||
Reference in New Issue
Block a user