mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +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:
@ -118,10 +118,7 @@ fixup_inherited_columns(Oid parentId, Oid childId, Bitmapset *columns)
|
||||
continue;
|
||||
}
|
||||
|
||||
attname = get_attname(parentId, attno);
|
||||
if (!attname)
|
||||
elog(ERROR, "cache lookup failed for attribute %d of relation %u",
|
||||
attno, parentId);
|
||||
attname = get_attname(parentId, attno, false);
|
||||
attno = get_attnum(childId, attname);
|
||||
if (attno == InvalidAttrNumber)
|
||||
elog(ERROR, "cache lookup failed for attribute %s of relation %u",
|
||||
|
Reference in New Issue
Block a user