MCPcopy Create free account
hub / github.com/apache/cloudberry / get_tle_by_resno

Function get_tle_by_resno

src/backend/parser/parse_relation.c:3690–3703  ·  view source on GitHub ↗

* Given a targetlist and a resno, return the matching TargetEntry * * Returns NULL if resno is not present in list. * * Note: we need to search, rather than just indexing with list_nth(), * because not all tlists are sorted by resno. */

Source from the content-addressed store, hash-verified

3688 * because not all tlists are sorted by resno.
3689 */
3690TargetEntry *
3691get_tle_by_resno(List *tlist, AttrNumber resno)
3692{
3693 ListCell *l;
3694
3695 foreach(l, tlist)
3696 {
3697 TargetEntry *tle = (TargetEntry *) lfirst(l);
3698
3699 if (tle->resno == resno)
3700 return tle;
3701 }
3702 return NULL;
3703}
3704
3705/*
3706 * Given a Query and rangetable index, return relation's RowMarkClause if any

Callers 15

adjust_view_column_setFunction · 0.85
rewriteTargetViewFunction · 0.85
get_variableFunction · 0.85
resolve_special_varnoFunction · 0.85
get_name_for_var_fieldFunction · 0.85
currtid_for_viewFunction · 0.85
examine_simple_variableFunction · 0.85
show_grouping_set_keysFunction · 0.85
show_sort_group_keysFunction · 0.85
show_motion_keysFunction · 0.85
count_rowexpr_columnsFunction · 0.85

Calls 1

foreachFunction · 0.50

Tested by

no test coverage detected