mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
get_relid_attribute_name is dead, long live get_attname
The modern way is to use a missing_ok argument instead of two separate almost-identical routines, so do that. Author: Michaël Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20180201063212.GE6398@paquier.xyz
This commit is contained in:
2
src/backend/utils/cache/relcache.c
vendored
2
src/backend/utils/cache/relcache.c
vendored
@ -5250,7 +5250,7 @@ errtablecol(Relation rel, int attnum)
|
||||
if (attnum > 0 && attnum <= reldesc->natts)
|
||||
colname = NameStr(TupleDescAttr(reldesc, attnum - 1)->attname);
|
||||
else
|
||||
colname = get_relid_attribute_name(RelationGetRelid(rel), attnum);
|
||||
colname = get_attname(RelationGetRelid(rel), attnum, false);
|
||||
|
||||
return errtablecolname(rel, colname);
|
||||
}
|
||||
|
Reference in New Issue
Block a user