1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +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:
Alvaro Herrera
2018-02-12 19:30:30 -03:00
parent 88ef48c1cc
commit 8237f27b50
11 changed files with 40 additions and 55 deletions

View File

@ -2687,7 +2687,7 @@ get_rte_attribute_name(RangeTblEntry *rte, AttrNumber attnum)
* built (which can easily happen for rules).
*/
if (rte->rtekind == RTE_RELATION)
return get_relid_attribute_name(rte->relid, attnum);
return get_attname(rte->relid, attnum, false);
/*
* Otherwise use the column name from eref. There should always be one.