PostgreSQL Source Code  git master
pg_list.h File Reference
#include "nodes/nodes.h"
Include dependency graph for pg_list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  ListCell
 
struct  List
 
struct  ForEachState
 
struct  ForBothState
 
struct  ForBothCellState
 
struct  ForThreeState
 
struct  ForFourState
 
struct  ForFiveState
 

Macros

#define NIL   ((List *) NULL)
 
#define lfirst(lc)   ((lc)->ptr_value)
 
#define lfirst_int(lc)   ((lc)->int_value)
 
#define lfirst_oid(lc)   ((lc)->oid_value)
 
#define lfirst_node(type, lc)   castNode(type, lfirst(lc))
 
#define linitial(l)   lfirst(list_nth_cell(l, 0))
 
#define linitial_int(l)   lfirst_int(list_nth_cell(l, 0))
 
#define linitial_oid(l)   lfirst_oid(list_nth_cell(l, 0))
 
#define linitial_node(type, l)   castNode(type, linitial(l))
 
#define lsecond(l)   lfirst(list_nth_cell(l, 1))
 
#define lsecond_int(l)   lfirst_int(list_nth_cell(l, 1))
 
#define lsecond_oid(l)   lfirst_oid(list_nth_cell(l, 1))
 
#define lsecond_node(type, l)   castNode(type, lsecond(l))
 
#define lthird(l)   lfirst(list_nth_cell(l, 2))
 
#define lthird_int(l)   lfirst_int(list_nth_cell(l, 2))
 
#define lthird_oid(l)   lfirst_oid(list_nth_cell(l, 2))
 
#define lthird_node(type, l)   castNode(type, lthird(l))
 
#define lfourth(l)   lfirst(list_nth_cell(l, 3))
 
#define lfourth_int(l)   lfirst_int(list_nth_cell(l, 3))
 
#define lfourth_oid(l)   lfirst_oid(list_nth_cell(l, 3))
 
#define lfourth_node(type, l)   castNode(type, lfourth(l))
 
#define llast(l)   lfirst(list_last_cell(l))
 
#define llast_int(l)   lfirst_int(list_last_cell(l))
 
#define llast_oid(l)   lfirst_oid(list_last_cell(l))
 
#define llast_node(type, l)   castNode(type, llast(l))
 
#define list_make_ptr_cell(v)   ((ListCell) {.ptr_value = (v)})
 
#define list_make_int_cell(v)   ((ListCell) {.int_value = (v)})
 
#define list_make_oid_cell(v)   ((ListCell) {.oid_value = (v)})
 
#define list_make1(x1)   list_make1_impl(T_List, list_make_ptr_cell(x1))
 
#define list_make2(x1, x2)   list_make2_impl(T_List, list_make_ptr_cell(x1), list_make_ptr_cell(x2))
 
#define list_make3(x1, x2, x3)
 
#define list_make4(x1, x2, x3, x4)
 
#define list_make5(x1, x2, x3, x4, x5)
 
#define list_make1_int(x1)   list_make1_impl(T_IntList, list_make_int_cell(x1))
 
#define list_make2_int(x1, x2)   list_make2_impl(T_IntList, list_make_int_cell(x1), list_make_int_cell(x2))
 
#define list_make3_int(x1, x2, x3)
 
#define list_make4_int(x1, x2, x3, x4)
 
#define list_make5_int(x1, x2, x3, x4, x5)
 
#define list_make1_oid(x1)   list_make1_impl(T_OidList, list_make_oid_cell(x1))
 
#define list_make2_oid(x1, x2)   list_make2_impl(T_OidList, list_make_oid_cell(x1), list_make_oid_cell(x2))
 
#define list_make3_oid(x1, x2, x3)
 
#define list_make4_oid(x1, x2, x3, x4)
 
#define list_make5_oid(x1, x2, x3, x4, x5)
 
#define list_nth_node(type, list, n)   castNode(type, list_nth(list, n))
 
#define foreach(cell, lst)
 
#define foreach_delete_current(lst, cell)
 
#define foreach_current_index(cell)   (cell##__state.i)
 
#define for_each_from(cell, lst, N)
 
#define for_each_cell(cell, lst, initcell)
 
#define forboth(cell1, list1, cell2, list2)
 
#define multi_for_advance_cell(cell, state, l, i)
 
#define for_both_cell(cell1, list1, initcell1, cell2, list2, initcell2)
 
#define forthree(cell1, list1, cell2, list2, cell3, list3)
 
#define forfour(cell1, list1, cell2, list2, cell3, list3, cell4, list4)
 
#define forfive(cell1, list1, cell2, list2, cell3, list3, cell4, list4, cell5, list5)
 

Typedefs

typedef union ListCell ListCell
 
typedef struct List List
 
typedef struct ForEachState ForEachState
 
typedef struct ForBothState ForBothState
 
typedef struct ForBothCellState ForBothCellState
 
typedef struct ForThreeState ForThreeState
 
typedef struct ForFourState ForFourState
 
typedef struct ForFiveState ForFiveState
 
typedef int(* list_sort_comparator) (const ListCell *a, const ListCell *b)
 

Functions

static ListCelllist_head (const List *l)
 
static ListCelllist_tail (const List *l)
 
static ListCelllist_second_cell (const List *l)
 
static int list_length (const List *l)
 
static ListCelllist_nth_cell (const List *list, int n)
 
static ListCelllist_last_cell (const List *list)
 
static void * list_nth (const List *list, int n)
 
static int list_nth_int (const List *list, int n)
 
static Oid list_nth_oid (const List *list, int n)
 
static int list_cell_number (const List *l, const ListCell *c)
 
static ListCelllnext (const List *l, const ListCell *c)
 
static ForEachState for_each_from_setup (const List *lst, int N)
 
static ForEachState for_each_cell_setup (const List *lst, const ListCell *initcell)
 
static ForBothCellState for_both_cell_setup (const List *list1, const ListCell *initcell1, const List *list2, const ListCell *initcell2)
 
Listlist_make1_impl (NodeTag t, ListCell datum1)
 
Listlist_make2_impl (NodeTag t, ListCell datum1, ListCell datum2)
 
Listlist_make3_impl (NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3)
 
Listlist_make4_impl (NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4)
 
Listlist_make5_impl (NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4, ListCell datum5)
 
pg_nodiscard Listlappend (List *list, void *datum)
 
pg_nodiscard Listlappend_int (List *list, int datum)
 
pg_nodiscard Listlappend_oid (List *list, Oid datum)
 
pg_nodiscard Listlist_insert_nth (List *list, int pos, void *datum)
 
pg_nodiscard Listlist_insert_nth_int (List *list, int pos, int datum)
 
pg_nodiscard Listlist_insert_nth_oid (List *list, int pos, Oid datum)
 
pg_nodiscard Listlcons (void *datum, List *list)
 
pg_nodiscard Listlcons_int (int datum, List *list)
 
pg_nodiscard Listlcons_oid (Oid datum, List *list)
 
pg_nodiscard Listlist_concat (List *list1, const List *list2)
 
pg_nodiscard Listlist_concat_copy (const List *list1, const List *list2)
 
pg_nodiscard Listlist_truncate (List *list, int new_size)
 
bool list_member (const List *list, const void *datum)
 
bool list_member_ptr (const List *list, const void *datum)
 
bool list_member_int (const List *list, int datum)
 
bool list_member_oid (const List *list, Oid datum)
 
pg_nodiscard Listlist_delete (List *list, void *datum)
 
pg_nodiscard Listlist_delete_ptr (List *list, void *datum)
 
pg_nodiscard Listlist_delete_int (List *list, int datum)
 
pg_nodiscard Listlist_delete_oid (List *list, Oid datum)
 
pg_nodiscard Listlist_delete_first (List *list)
 
pg_nodiscard Listlist_delete_last (List *list)
 
pg_nodiscard Listlist_delete_nth_cell (List *list, int n)
 
pg_nodiscard Listlist_delete_cell (List *list, ListCell *cell)
 
Listlist_union (const List *list1, const List *list2)
 
Listlist_union_ptr (const List *list1, const List *list2)
 
Listlist_union_int (const List *list1, const List *list2)
 
Listlist_union_oid (const List *list1, const List *list2)
 
Listlist_intersection (const List *list1, const List *list2)
 
Listlist_intersection_int (const List *list1, const List *list2)
 
Listlist_difference (const List *list1, const List *list2)
 
Listlist_difference_ptr (const List *list1, const List *list2)
 
Listlist_difference_int (const List *list1, const List *list2)
 
Listlist_difference_oid (const List *list1, const List *list2)
 
pg_nodiscard Listlist_append_unique (List *list, void *datum)
 
pg_nodiscard Listlist_append_unique_ptr (List *list, void *datum)
 
pg_nodiscard Listlist_append_unique_int (List *list, int datum)
 
pg_nodiscard Listlist_append_unique_oid (List *list, Oid datum)
 
pg_nodiscard Listlist_concat_unique (List *list1, const List *list2)
 
pg_nodiscard Listlist_concat_unique_ptr (List *list1, const List *list2)
 
pg_nodiscard Listlist_concat_unique_int (List *list1, const List *list2)
 
pg_nodiscard Listlist_concat_unique_oid (List *list1, const List *list2)
 
void list_deduplicate_oid (List *list)
 
void list_free (List *list)
 
void list_free_deep (List *list)
 
pg_nodiscard Listlist_copy (const List *list)
 
pg_nodiscard Listlist_copy_tail (const List *list, int nskip)
 
pg_nodiscard Listlist_copy_deep (const List *oldlist)
 
void list_sort (List *list, list_sort_comparator cmp)
 
int list_int_cmp (const ListCell *p1, const ListCell *p2)
 
int list_oid_cmp (const ListCell *p1, const ListCell *p2)
 

Macro Definition Documentation

◆ for_both_cell

#define for_both_cell (   cell1,
  list1,
  initcell1,
  cell2,
  list2,
  initcell2 
)
Value:
for (ForBothCellState cell1##__state = \
for_both_cell_setup(list1, initcell1, list2, initcell2); \
multi_for_advance_cell(cell1, cell1##__state, l1, i1), \
multi_for_advance_cell(cell2, cell1##__state, l2, i2), \
(cell1 != NULL && cell2 != NULL); \
cell1##__state.i1++, cell1##__state.i2++)
static ForBothCellState for_both_cell_setup(const List *list1, const ListCell *initcell1, const List *list2, const ListCell *initcell2)
Definition: pg_list.h:477

Definition at line 468 of file pg_list.h.

Referenced by get_qual_for_range().

◆ for_each_cell

#define for_each_cell (   cell,
  lst,
  initcell 
)
Value:
for (ForEachState cell##__state = for_each_cell_setup(lst, initcell); \
(cell##__state.l != NIL && \
cell##__state.i < cell##__state.l->length) ? \
(cell = &cell##__state.l->elements[cell##__state.i], true) : \
(cell = NULL, false); \
cell##__state.i++)
#define NIL
Definition: pg_list.h:65
static ForEachState for_each_cell_setup(const List *lst, const ListCell *initcell)
Definition: pg_list.h:426

Definition at line 417 of file pg_list.h.

Referenced by append_nonpartial_cost(), consider_groupingsets_paths(), ExecBuildUpdateProjection(), extract_rollup_sets(), find_param_referent(), gen_prune_steps_from_opexps(), get_steps_using_prefix_recurse(), join_search_one_level(), make_rels_by_clause_joins(), select_common_type(), split_pathtarget_at_srfs(), transformAssignmentIndirection(), and transformWithClause().

◆ for_each_from

#define for_each_from (   cell,
  lst,
 
)
Value:
for (ForEachState cell##__state = for_each_from_setup(lst, N); \
(cell##__state.l != NIL && \
cell##__state.i < cell##__state.l->length) ? \
(cell = &cell##__state.l->elements[cell##__state.i], true) : \
(cell = NULL, false); \
cell##__state.i++)
#define NIL
Definition: pg_list.h:65
static ForEachState for_each_from_setup(const List *lst, int N)
Definition: pg_list.h:402

Definition at line 393 of file pg_list.h.

Referenced by add_paths_to_append_rel(), ATCheckPartitionsNotInUse(), consider_groupingsets_paths(), create_groupingsets_plan(), estimate_num_groups(), expand_grouping_sets(), exprTypmod(), get_rule_expr(), and parseCheckAggregates().

◆ forboth

#define forboth (   cell1,
  list1,
  cell2,
  list2 
)
Value:
for (ForBothState cell1##__state = {(list1), (list2), 0}; \
multi_for_advance_cell(cell1, cell1##__state, l1, i), \
multi_for_advance_cell(cell2, cell1##__state, l2, i), \
(cell1 != NULL && cell2 != NULL); \
cell1##__state.i++)
int i

Definition at line 446 of file pg_list.h.

Referenced by _equalList(), AddRoleMems(), adjust_paths_for_srfs(), apply_tlist_labeling(), assign_collations_walker(), ATPostAlterTypeCleanup(), ATPrepAlterColumnType(), cmp_list_len_contents_asc(), common_prefix_cmp(), compare_pathkeys(), create_indexscan_plan(), create_memoize_plan(), CreateTriggerFiringOn(), DelRoleMems(), deparseDirectUpdateSql(), determineRecursiveColTypes(), distinct_col_search(), equalRSDesc(), ExecBuildUpdateProjection(), ExecEvalXmlExpr(), ExecHashTableCreate(), ExecInitExprRec(), ExecInitIndexScan(), ExecScanSubPlan(), ExecSetParamPlan(), ExecWithCheckOptions(), expandNSItemAttrs(), expandRecordVariable(), expandRTE(), find_param_referent(), fix_indexorderby_references(), fix_indexqual_clause(), flatten_join_alias_vars_mutator(), get_expr_result_type(), get_matching_location(), get_number_of_groups(), get_qual_for_range(), get_rule_expr(), get_simple_values_rte(), get_tablefunc(), make_row_comparison_op(), make_row_distinct_op(), MergeAttributes(), pathkeys_count_contained_in(), postgresPlanDirectModify(), reduce_outer_joins_pass2(), ReindexRelationConcurrently(), relation_has_unique_index_for(), rename_constraint_internal(), renameatt_internal(), set_append_rel_size(), set_deparse_for_query(), set_plan_refs(), set_simple_column_names(), standard_planner(), tfuncInitialize(), tlist_same_exprs(), transformAggregateCall(), transformDistinctOnClause(), transformJoinUsingClause(), transformRangeTableSample(), transformSetOperationTree(), transformValuesClause(), trivial_subqueryscan(), and xmlelement().

◆ foreach

#define foreach (   cell,
  lst 
)
Value:
for (ForEachState cell##__state = {(lst), 0}; \
(cell##__state.l != NIL && \
cell##__state.i < cell##__state.l->length) ? \
(cell = &cell##__state.l->elements[cell##__state.i], true) : \
(cell = NULL, false); \
cell##__state.i++)
#define NIL
Definition: pg_list.h:65

Definition at line 352 of file pg_list.h.

◆ foreach_current_index

◆ foreach_delete_current

◆ forfive

#define forfive (   cell1,
  list1,
  cell2,
  list2,
  cell3,
  list3,
  cell4,
  list4,
  cell5,
  list5 
)
Value:
for (ForFiveState cell1##__state = {(list1), (list2), (list3), (list4), (list5), 0}; \
multi_for_advance_cell(cell1, cell1##__state, l1, i), \
multi_for_advance_cell(cell2, cell1##__state, l2, i), \
multi_for_advance_cell(cell3, cell1##__state, l3, i), \
multi_for_advance_cell(cell4, cell1##__state, l4, i), \
multi_for_advance_cell(cell5, cell1##__state, l5, i), \
(cell1 != NULL && cell2 != NULL && cell3 != NULL && \
cell4 != NULL && cell5 != NULL); \
cell1##__state.i++)
int i

Definition at line 516 of file pg_list.h.

Referenced by ExecInitExprRec(), and get_tablefunc().

◆ forfour

#define forfour (   cell1,
  list1,
  cell2,
  list2,
  cell3,
  list3,
  cell4,
  list4 
)
Value:
for (ForFourState cell1##__state = {(list1), (list2), (list3), (list4), 0}; \
multi_for_advance_cell(cell1, cell1##__state, l1, i), \
multi_for_advance_cell(cell2, cell1##__state, l2, i), \
multi_for_advance_cell(cell3, cell1##__state, l3, i), \
multi_for_advance_cell(cell4, cell1##__state, l4, i), \
(cell1 != NULL && cell2 != NULL && cell3 != NULL && cell4 != NULL); \
cell1##__state.i++)
int i

Definition at line 503 of file pg_list.h.

Referenced by BuildDescFromLists(), convert_EXISTS_to_ANY(), ExecIndexBuildScanKeys(), generate_setop_tlist(), get_from_clause_coldeflist(), and transformSetOperationStmt().

◆ forthree

#define forthree (   cell1,
  list1,
  cell2,
  list2,
  cell3,
  list3 
)
Value:
for (ForThreeState cell1##__state = {(list1), (list2), (list3), 0}; \
multi_for_advance_cell(cell1, cell1##__state, l1, i), \
multi_for_advance_cell(cell2, cell1##__state, l2, i), \
multi_for_advance_cell(cell3, cell1##__state, l3, i), \
(cell1 != NULL && cell2 != NULL && cell3 != NULL); \
cell1##__state.i++)
int i

Definition at line 491 of file pg_list.h.

Referenced by addRangeTableEntryForFunction(), buildNSItemFromLists(), contain_leaked_vars_walker(), expand_indexqual_rowcompare(), expandRTE(), generate_append_tlist(), split_pathtarget_at_srfs(), transformInsertRow(), and transformInsertStmt().

◆ lfirst

#define lfirst (   lc)    ((lc)->ptr_value)

Definition at line 169 of file pg_list.h.

Referenced by _equalList(), _outList(), _SPI_execute_plan(), _SPI_make_plan_non_temp(), _SPI_save_plan(), AcquireExecutorLocks(), AcquireRewriteLocks(), add_base_rels_to_query(), add_foreign_final_paths(), add_foreign_ordered_paths(), add_new_columns_to_pathtarget(), add_part_relids(), add_partial_path(), add_partial_path_precheck(), add_path(), add_path_precheck(), add_paths_to_append_rel(), add_paths_to_grouping_rel(), add_paths_to_joinrel(), add_paths_with_pathkeys_for_rel(), add_placeholders_to_base_rels(), add_placeholders_to_joinrel(), add_predicate_to_index_quals(), add_row_identity_var(), add_rtes_to_flat_rtable(), add_security_quals(), add_sp_item_to_pathtarget(), add_sp_items_to_pathtarget(), add_to_flat_tlist(), add_unique_group_var(), add_vars_to_targetlist(), add_with_check_options(), addArc(), addArcs(), AddEventToPendingNotifies(), addFamilyMember(), addKey(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), AddRelationNewConstraints(), AddWALInfoToBackupManifest(), adjust_paths_for_srfs(), adjust_rowcount_for_semijoins(), adjustJoinTreeList(), advance_windowaggregate(), advance_windowaggregate_base(), afterTriggerDeleteHeadEventChunk(), AfterTriggerFreeQuery(), AfterTriggerSetState(), AlterDatabase(), AlterDomainNotNull(), AlterFunction(), AlterOperator(), AlterPublicationTables(), AlterRole(), AlterSubscription_refresh(), AlterTableGetLockLevel(), AlterTableGetRelOptionsLockLevel(), AlterTSDictionary(), AlterType(), analyzeCTE(), analyzeCTETargetList(), append_nonpartial_cost(), append_startup_cost_compare(), append_total_cost_compare(), appendAggOrderBy(), appendConditions(), appendGroupByClause(), appendOrderByClause(), appendTypeNameToBuffer(), apply_child_basequals(), apply_handle_truncate(), apply_pathtarget_labeling_to_tlist(), apply_scanjoin_target_to_paths(), apply_server_options(), apply_table_options(), apply_tlist_labeling(), ApplyExtensionUpdates(), ApplyLauncherMain(), approx_tuple_count(), arrayexpr_next_fn(), assign_collations_walker(), assign_hypothetical_collations(), assign_list_collations(), assign_param_for_placeholdervar(), assign_param_for_var(), assignSortGroupRef(), AsyncExistsPendingNotify(), asyncQueueAddEntries(), ATAddCheckConstraint(), AtCommit_Notify(), ATController(), AtEOSubXact_on_commit_actions(), AtEOXact_on_commit_actions(), AtEOXact_Snapshot(), ATExecSetRelOptions(), ATGetQueueEntry(), ATParseTransformCmd(), ATPostAlterTypeCleanup(), ATPostAlterTypeParse(), ATRewriteCatalogs(), ATRewriteTable(), ATRewriteTables(), AtSubCommit_Notify(), blvalidate(), bms_equal_any(), boot_get_type_io_data(), brinvalidate(), btadjustmembers(), btvalidate(), build_expr_data(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_rel_hash(), build_joinrel_tlist(), build_local_reloptions(), build_merged_partition_bounds(), build_path_tlist(), build_paths_for_OR(), build_pertrans_for_aggref(), build_physical_tlist(), build_remote_returning(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), BuildDescForRelation(), BuildDescFromLists(), BuildRelationExtStatistics(), cached_scansel(), CachedPlanAllowsSimpleValidityCheck(), can_minmax_aggs(), ChangeVarNodes(), check_constant_qual(), check_datestyle(), check_db(), check_duplicates_in_publist(), check_functional_grouping(), check_hba(), check_index_only(), check_index_predicates(), check_log_destination(), check_log_statement(), check_outerjoin_delay(), check_output_expressions(), check_redundant_nullability_qual(), check_role(), check_selective_binary_conversion(), check_sql_fn_retval(), check_temp_tablespaces(), check_ungrouped_columns_walker(), check_usermap(), check_wal_consistency_checking(), checkInsertTargets(), checkNameSpaceConflicts(), CheckRADIUSAuth(), checkRuleResultList(), checkSharedDependencies(), checkWellFormedRecursionWalker(), choose_best_statistics(), choose_bitmap_and(), ChooseConstraintName(), ChooseExtendedStatisticNameAddition(), ChooseForeignKeyConstraintNameAddition(), ChooseIndexColumnNames(), ChooseIndexNameAddition(), ChoosePortalStrategy(), classify_index_clause_usage(), clause_is_strict_for(), clauselist_apply_dependencies(), clauselist_selectivity_ext(), clauselist_selectivity_or(), CloneFkReferencing(), CloseTableList(), cluster(), cmp_list_len_asc(), cmp_list_len_contents_asc(), coerce_record_to_complex(), colname_is_unique(), colNameToVar(), compare_pathkeys(), compare_tlist_datatypes(), compareWalFileNames(), compute_function_attributes(), compute_semijoin_info(), ComputeExtStatisticsRows(), ComputeIndexAttrs(), consider_index_join_outer_rels(), consider_parallel_mergejoin(), consider_parallel_nestloop(), ConstructTupleDescriptor(), contain_leaked_vars_walker(), convert_EXISTS_to_ANY(), convert_requires_to_datum(), convert_subquery_pathkeys(), CopyGetAttnums(), CopyMultiInsertInfoCleanup(), CopyMultiInsertInfoFlush(), cost_append(), cost_bitmap_and_node(), cost_bitmap_or_node(), cost_incremental_sort(), cost_qual_eval(), count_nonjunk_tlist_entries(), create_append_path(), create_append_plan(), create_bitmap_and_path(), create_bitmap_or_path(), create_bitmap_subplan(), create_ctas_nodata(), create_ctescan_plan(), create_customscan_plan(), create_final_distinct_paths(), create_foreignscan_plan(), create_groupingsets_path(), create_groupingsets_plan(), create_index_paths(), create_indexscan_plan(), create_join_clause(), create_lateral_join_info(), create_limit_plan(), create_memoize_plan(), create_merge_append_path(), create_merge_append_plan(), create_mergejoin_plan(), create_minmaxagg_path(), create_minmaxagg_plan(), create_nestloop_path(), create_ordered_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_set_projection_path(), create_unique_plan(), create_window_paths(), create_windowagg_plan(), createdb(), CreateEventTrigger(), CreateExtension(), CreateExtensionInternal(), CreateRole(), CreateSchemaCommand(), CreateStatistics(), CreateSubscription(), CreateTriggerFiringOn(), dblink_fdw_validator(), deconstruct_recurse(), defGetStringList(), DefineDomain(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineRange(), DefineRelation(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DefineType(), DefineView(), DefineVirtualRelation(), deflist_to_tuplestore(), DelRoleMems(), deparseAggref(), deparseAnalyzeSql(), deparseArrayExpr(), deparseBoolExpr(), deparseCaseExpr(), deparseColumnRef(), deparseFuncExpr(), deparseParam(), deparseRelation(), deparseSubqueryTargetList(), deparseSubscriptingRef(), deparseTruncateSql(), deparseVar(), dependencies_clauselist_selectivity(), dependency_is_compatible_clause(), dependency_is_compatible_expression(), DetachPartitionFinalize(), determineRecursiveColTypes(), dintdict_init(), dispell_init(), distribute_row_identity_vars(), do_analyze_rel(), do_start_worker(), DoCopy(), domain_check_input(), DropDatabase(), dropOperators(), dropProcedures(), DropRole(), DropSubscription(), dsimple_init(), dsnowball_init(), dsynonym_init(), dump_block(), dump_case(), dump_dynexecute(), dump_dynfors(), dump_getdiag(), dump_if(), dump_open(), dump_raise(), dump_return_query(), dump_stmts(), dxsyn_init(), eclass_already_used(), eclass_useful_for_merging(), EnumValuesCreate(), equalRSDesc(), estimate_multivariate_ndistinct(), estimate_num_groups(), eval_const_expressions_mutator(), EvalOrderByExpressions(), EvalPlanQualEnd(), EvalPlanQualStart(), evaluate_function(), EvaluateParams(), EventTriggerCollectGrant(), EventTriggerCommonSetup(), examine_variable(), exec_check_rw_parameter(), exec_eval_using_params(), exec_stmt_block(), exec_stmt_case(), exec_stmt_execsql(), exec_stmt_getdiag(), exec_stmt_if(), exec_stmt_raise(), exec_stmts(), Exec_UnlistenCommit(), ExecAlterDefaultPrivilegesStmt(), ExecAlterExtensionStmt(), ExecBuildAggTrans(), ExecCheckPlanOutput(), ExecCheckRTPerms(), ExecCheckXactReadOnly(), ExecCloseResultRelations(), ExecEndPlan(), ExecEvalFuncArgs(), ExecEvalXmlExpr(), ExecFindJunkAttributeInTlist(), ExecGetTriggerResultRel(), ExecGrant_Relation(), ExecHashGetHashValue(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitBitmapAnd(), ExecInitBitmapOr(), ExecInitCoerceToDomain(), ExecInitExprList(), ExecInitExprRec(), ExecInitFunc(), ExecInitFunctionScan(), ExecInitIndexScan(), ExecInitInsertProjection(), ExecInitJunkFilter(), ExecInitJunkFilterConversion(), ExecInitModifyTable(), ExecInitNode(), ExecInitProjectSet(), ExecInitPruningContext(), ExecInitQual(), ExecInitSubscriptingRef(), ExecInitWholeRowVar(), ExecInitWindowAgg(), ExecLockRows(), ExecModifyTable(), ExecNestLoop(), ExecPostprocessPlan(), ExecPrepareExprList(), ExecReindex(), ExecReScan(), ExecReScanFunctionScan(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSerializePlan(), ExecSetParamPlan(), ExecSetVariableStmt(), ExecSupportsBackwardScan(), ExecTypeFromExprList(), ExecTypeFromTLInternal(), ExecTypeSetColNames(), ExecuteCallStmt(), ExecuteDoStmt(), ExecuteGrantStmt(), ExecuteTruncate(), ExecuteTruncateGuts(), ExecVacuum(), ExecWithCheckOptions(), expand_appendrel_subquery(), expand_col_privileges(), expand_function_arguments(), expand_grouping_sets(), expand_groupingset_node(), expand_insert_targetlist(), ExpandAllTables(), expandNSItemAttrs(), expandNSItemVars(), expandRecordVariable(), expandRTE(), ExpandSingleTable(), expandTupleDesc(), ExplainCustomChildren(), ExplainNode(), ExplainPrintTriggers(), ExplainPropertyList(), ExplainPropertyListNested(), ExplainQuery(), ExplainResultDesc(), ExplainSubPlans(), expression_tree_mutator(), expression_tree_walker(), exprLocation(), exprs_known_equal(), exprTypmod(), extract_grouping_collations(), extract_grouping_cols(), extract_grouping_ops(), extract_lateral_references(), extract_or_clause(), extract_query_dependencies_walker(), extract_restriction_or_clauses(), extract_rollup_sets(), extract_update_targetlist_colnos(), ExtractConnectionOptions(), ExtractExtensionList(), extractRemainingColumns(), fetch_table_list(), fetch_upper_rel(), FetchTableStates(), FigureColnameInternal(), file_fdw_validator(), file_sort_by_lsn(), fileGetOptions(), fill_hba_line(), fill_hba_view(), filter_list_to_array(), finalize_aggregate(), finalize_grouping_exprs_walker(), finalize_plan(), find_compatible_agg(), find_computable_ec_member(), find_derived_clause_for_ec_member(), find_duplicate_ors(), find_ec_member_matching_expr(), find_em_expr_for_input_target(), find_em_expr_for_rel(), find_expr_references_walker(), find_forced_null_vars(), find_indexpath_quals(), find_install_path(), find_join_rel(), find_jointree_node_for_rel(), find_list_position(), find_mergeclauses_for_outer_pathkeys(), find_nonnullable_rels_walker(), find_nonnullable_vars_walker(), find_param_path_info(), find_param_referent(), find_partition_scheme(), find_placeholder_info(), find_placeholders_in_expr(), find_placeholders_recurse(), find_recursive_union(), find_single_rel_for_clauses(), find_update_path(), find_var_for_subquery_tle(), findAttrByName(), findDefaultOnlyColumns(), findTargetlistEntrySQL92(), findTargetlistEntrySQL99(), findWindowClause(), fireRIRrules(), fireRules(), fix_alternative_subplan(), fix_append_rel_relids(), fix_indexorderby_references(), fix_indexqual_clause(), fix_indexqual_operand(), fix_placeholder_input_needed_levels(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_grouping_sets(), flatten_join_alias_vars_mutator(), flatten_set_variable_args(), flush_pipe_input(), fmgr_sql(), foreign_expr_walker(), foreign_grouping_ok(), foreign_join_ok(), FormIndexDatum(), FormPartitionKeyDatum(), free_block(), free_case(), free_dynexecute(), free_dynfors(), free_if(), free_open(), free_raise(), free_return_query(), free_stmts(), func_get_detail(), funcname_signature_string(), gather_grouping_paths(), gen_partprune_steps_internal(), gen_prune_steps_from_opexps(), generate_append_tlist(), generate_base_implied_equalities(), generate_base_implied_equalities_broken(), generate_base_implied_equalities_const(), generate_base_implied_equalities_no_const(), generate_bitmap_or_paths(), generate_gather_paths(), generate_implied_equalities_for_column(), generate_join_implied_equalities_broken(), generate_join_implied_equalities_for_ecs(), generate_join_implied_equalities_normal(), generate_orderedappend_paths(), generate_partitionwise_join_paths(), generate_relation_name(), generate_setop_grouplist(), generate_setop_tlist(), generate_subquery_params(), generate_subquery_vars(), generate_union_paths(), generate_useful_gather_paths(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), genericcostestimate(), get_actual_variable_range(), get_agg_clause_costs(), get_agg_expr(), get_altertable_subcmdtypes(), get_available_versions_for_extension(), get_baserel_parampathinfo(), get_basic_select_query(), get_batch_size_option(), get_cheapest_fractional_path(), get_cheapest_fractional_path_for_pathkeys(), get_cheapest_parallel_safe_total_inner(), get_cheapest_parameterized_child_path(), get_cheapest_path_for_pathkeys(), get_connect_string(), get_eclass_for_sort_expr(), get_ENR(), get_expr_result_type(), get_ext_ver_info(), get_file_fdw_attribute_options(), get_foreign_key_join_selectivity(), get_from_clause(), get_from_clause_coldeflist(), get_from_clause_item(), get_func_expr(), get_index_clause_from_support(), get_index_paths(), get_indexpath_pages(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_matching_location(), get_matching_partitions(), get_memoize_path(), get_name_for_var_field(), get_nearest_unprocessed_vertex(), get_number_of_groups(), get_parameter(), get_parse_rowmark(), get_partkey_exec_paramids(), get_plan_rowmark(), get_policies_for_relation(), get_qual_for_hash(), get_qual_for_range(), get_range_key_properties(), get_range_nulltest(), get_rel_sync_entry(), get_relation_column_alias_ids(), get_relation_foreign_keys(), get_relids_in_jointree(), get_rels_with_domain(), get_required_extension(), get_rte_attribute_is_dropped(), get_rule_expr(), get_rule_groupingset(), get_rule_orderby(), get_rule_windowclause(), get_rule_windowspec(), get_select_query_def(), get_simple_values_rte(), get_sortgrouplist_exprs(), get_sortgroupref_clause(), get_sortgroupref_clause_noerr(), get_sortgroupref_tle(), get_steps_using_prefix_recurse(), get_switched_clauses(), get_tablefunc(), get_tablesample_def(), get_target_list(), get_tle_by_resno(), get_tlist_exprs(), get_update_query_targetlist_def(), get_useful_ecs_for_relation(), get_useful_pathkeys_for_relation(), get_values_def(), get_windowfunc_expr(), get_with_clause(), GetAfterTriggersTableData(), GetCommandLogLevel(), GetCTEForRTE(), GetExistingLocalJoinPath(), GetIndexInputType(), GetNSItemByRangeTablePosn(), gettype(), gimme_tree(), ginadjustmembers(), ginvalidate(), gistadjustmembers(), gistbufferinginserttuples(), gistRelocateBuildBuffersOnSplit(), gistvalidate(), GrantRole(), group_by_has_partkey(), grouping_is_hashable(), grouping_is_sortable(), grouping_planner(), has_dangerous_join_using(), has_indexed_join_quals(), has_join_restriction(), has_legal_joinclause(), has_partition_attrs(), has_stats_of_kind(), has_unique_index(), hash_inner_and_outer(), hashadjustmembers(), hashagg_reset_spill_state(), hashvalidate(), have_dangerous_phv(), have_join_order_restriction(), have_relevant_joinclause(), heap_truncate(), heap_truncate_check_FKs(), identify_current_nestloop_params(), ImportForeignSchema(), index_other_operands_eval_cost(), indexcol_is_bool_constant_for_query(), infer_arbiter_indexes(), init_params(), init_returning_filter(), initialize_peragg(), InitPlan(), inline_function(), innerrel_is_unique(), interpret_AS_clause(), interpret_function_parameter_list(), intorel_startup(), is_exprlist_member(), is_innerrel_unique_for(), is_parallel_safe(), is_redundant_derived_clause(), isFutureCTE(), IsImportableForeignTable(), IsListeningOn(), isLockedRefname(), isQueryUsingTempRelation_walker(), join_is_legal(), join_is_removable(), join_search_one_level(), jointree_contains_lateral_outer_refs(), jsonb_exec_setup(), jsonb_path_query_internal(), JsonValueListNext(), JumbleExpr(), list_concat_unique(), list_concat_unique_ptr(), list_copy_deep(), list_delete(), list_delete_ptr(), list_difference(), list_difference_ptr(), list_free_private(), list_insert_nth(), list_intersection(), list_member(), list_member_ptr(), list_next_fn(), list_nth(), list_union(), list_union_ptr(), llvm_get_function(), load_hba(), load_ident(), load_libraries(), LoadPublications(), LockTableCommand(), LockViewRecurse_walker(), lookup_proof_cache(), lookup_var_attr_stats(), make_build_data(), make_canonical_pathkey(), make_fn_arguments(), make_group_input_target(), make_inner_pathkeys_for_merge(), make_jsp_expr_node_args(), make_new_connection(), make_outerjoininfo(), make_partial_grouping_target(), make_partition_op_expr(), make_partition_pruneinfo(), make_partitionedrel_pruneinfo(), make_path_rowexpr(), make_pathkeys_for_sortclauses(), make_pathtarget_from_tlist(), make_recursive_union(), make_rel_from_joinlist(), make_rels_by_clause_joins(), make_rels_by_clauseless_joins(), make_row_comparison_op(), make_row_distinct_op(), make_ruledef(), make_setop(), make_setop_translation_list(), make_sort_from_groupcols(), make_sort_from_sortclauses(), make_sort_input_target(), make_sub_restrictinfos(), make_tlist_from_pathtarget(), make_unique_from_pathkeys(), make_unique_from_sortclauses(), make_window_input_target(), MakeConfigurationMapping(), makeDependencyGraphWalker(), map_sql_typecoll_to_xmlschema_types(), markQueryForLocking(), markTargetListOrigins(), match_clause_to_index(), match_clause_to_partition_key(), match_eclasses_to_foreign_key_col(), match_expr_to_partition_keys(), match_foreign_keys_to_quals(), match_funcclause_to_indexcol(), match_index_to_operand(), match_join_clauses_to_index(), match_pathkeys_to_index(), match_unsorted_outer(), MatchNamedCall(), mcv_get_match_bitmap(), mcv_match_expression(), merge_clump(), merge_publications(), MergeAttributes(), MergeCheckConstraint(), MJExamineQuals(), NameListToQuotedString(), NameListToString(), negate_clause(), objectNamesToOids(), objectsInSchemaToOids(), OffsetVarNodes(), optionListToArray(), order_qual_clauses(), ordered_set_startup(), packArcInfoCmp(), packGraph(), paraminfo_get_equal_hashops(), parse_basebackup_options(), parse_func_options(), parse_hba_auth_opt(), parse_hba_line(), parse_ident_line(), parse_output_parameters(), parse_publication_options(), parse_subscription_options(), parse_tsquery(), parseCheckAggregates(), parseCreateReplSlotOptions(), ParseFuncOrColumn(), parseLocalRelOptions(), partkey_is_bool_constant_for_query(), pathkey_is_redundant(), pathkeys_count_contained_in(), pathkeys_useful_for_merging(), perform_base_backup(), perform_pruning_base_step(), perform_pullup_replace_vars(), pg_decode_startup(), pg_event_trigger_ddl_commands(), pg_extension_update_paths(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), PlanCacheObjectCallback(), planstate_tree_walker(), plpgsql_extra_checks_check_hook(), policy_role_list_to_array(), postgres_fdw_validator(), postgresAcquireSampleRowsFunc(), postgresExecForeignTruncate(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresImportForeignSchema(), postgresIsForeignRelUpdatable(), postgresql_fdw_validator(), PostmasterMain(), PreCommit_Notify(), PreCommit_on_commit_actions(), prep_domain_constraints(), prepare_query_params(), prepare_sort_from_pathkeys(), PrepareClientEncoding(), PrepareQuery(), PrepareTempTablespaces(), preprocess_function_rtes(), preprocess_grouping_sets(), preprocess_minmax_aggregates(), preprocess_qual_conditions(), preprocess_targetlist(), print_expr(), print_function_arguments(), print_pathkeys(), print_rt(), print_tl(), printSubscripts(), ProcedureCreate(), process_duplicate_ors(), process_equivalence(), process_pipe_input(), process_query_params(), process_security_barrier_quals(), process_startup_options(), process_sublinks_mutator(), process_subquery_nestloop_params(), process_syncing_tables_for_apply(), ProcessUtilitySlow(), prsd_headline(), PublicationAddTables(), PublicationDropTables(), pull_ands(), pull_ors(), pull_up_simple_subquery(), pull_up_simple_union_all(), pull_up_simple_values(), pull_up_sublinks_jointree_recurse(), pull_up_sublinks_qual_recurse(), pull_up_subqueries_recurse(), pull_varnos_walker(), push_ancestor_plan(), qual_is_pushdown_safe(), query_is_distinct_for(), QueryRewrite(), range_table_mutator(), raw_expression_tree_walker(), rebuild_database_list(), rebuild_fdw_scan_tlist(), recheck_cast_function_args(), recomputeNamespacePath(), reconsider_full_join_clause(), reconsider_outer_join_clause(), reconsider_outer_join_clauses(), recurse_set_operations(), reduce_outer_joins_pass1(), reduce_outer_joins_pass2(), reduce_unique_semijoins(), ReindexRelationConcurrently(), rel_supports_distinctness(), relation_can_be_sorted_early(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationBuildPartitionKey(), RelationCacheInvalidate(), RelationGetDummyIndexExpressions(), remap_groupColIdx(), RememberSyncRequest(), remove_on_commit_action(), remove_rel_from_joinlist(), remove_rel_from_query(), remove_unused_subquery_outputs(), remove_useless_joins(), remove_useless_result_rtes(), remove_useless_results_recurse(), RemoveInheritance(), RemoveObjects(), RemoveRelations(), RemoveSocketFiles(), reorder_function_arguments(), reorder_grouping_sets(), reparameterize_path(), reparameterize_pathlist_by_child(), replace_nestloop_param_placeholdervar(), replace_nestloop_param_var(), replace_vars_in_jointree(), ReportSlotConnectionError(), rescanLatestTimeLine(), resolve_unique_index_expr(), resolveTargetListUnknowns(), RewriteQuery(), rewriteRuleAction(), rewriteSearchAndCycle(), rewriteTargetListIU(), rewriteTargetView(), rewriteValuesRTE(), right_merge_direction(), row_security_policy_cmp(), scalararraysel(), scanNameSpaceForCTE(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), ScanQueryForLocks(), scanRTEForColumn(), search_indexed_tlist_for_sortgroupref(), SearchCatCacheList(), searchForDefault(), searchRangeTableForCol(), searchRangeTableForRel(), select_common_type(), select_common_typmod(), select_mergejoin_clauses(), select_outer_pathkeys_for_merge(), selectColorTrigrams(), SendBackupHeader(), sendDir(), SendNegotiateProtocolVersion(), SendRowDescriptionMessage(), sepgsql_avc_lookup(), sepgsql_avc_reclaim(), sepgsql_dml_privileges(), sepgsql_subxact_callback(), sepgsql_utility_command(), serialize_deflist(), set_append_references(), set_append_rel_pathlist(), set_append_rel_size(), set_base_rel_consider_startup(), set_baserel_partition_key_exprs(), set_cheapest(), set_cte_pathlist(), set_customscan_references(), set_deparse_for_query(), set_dummy_tlist_references(), set_function_pathlist(), set_function_size_estimates(), set_join_references(), set_joinrel_partition_key_exprs(), set_mergeappend_references(), set_param_references(), set_pathtarget_cost_width(), set_plan_references(), set_plan_refs(), set_rel_width(), set_relation_column_names(), set_rtable_names(), set_simple_column_names(), set_subquery_pathlist(), set_upper_references(), set_using_names(), SetClientEncoding(), SetDefaultACLsInSchemas(), setNamespaceColumnVisibility(), setNamespaceLateralState(), setRuleCheckAsUser_Query(), setup_simple_rel_arrays(), show_grouping_set_keys(), show_grouping_sets(), show_memoize_info(), show_plan_tlist(), show_tablesample(), ShutdownSQLFunction(), sort_inner_and_outer(), spgadjustmembers(), spgvalidate(), SPI_freeplan(), SPI_keepplan(), SPI_plan_is_valid(), split_pathtarget_at_srfs(), split_pathtarget_walker(), sql_exec_error_callback(), SS_charge_for_initplans(), SS_identify_outer_params(), SS_process_ctes(), standard_join_search(), standard_planner(), standard_ProcessUtility(), StartupXLOG(), stat_covers_expressions(), stat_find_expression(), statext_is_compatible_clause(), statext_is_compatible_clause_internal(), statext_mcv_clauselist_selectivity(), StoreConstraints(), storeOperators(), storeProcedures(), StoreRelCheck(), stringlist_to_identifierstr(), stringToQualifiedNameList(), strlist_to_textarray(), subbuild_joinrel_joinlist(), subbuild_joinrel_restrictlist(), subquery_planner(), tablesample_init(), targetIsInAllPartitionLists(), targetIsInSortList(), testexpr_is_hashable(), textToQualifiedNameList(), tfuncInitialize(), tfuncLoadRows(), thesaurus_init(), TidExprListCreate(), TidListEval(), TidQualFromRestrictInfoList(), TidRangeEval(), tliInHistory(), tliOfPointInHistory(), tlist_matches_tupdesc(), tlist_member(), tlist_member_match_var(), tlist_same_collations(), tlist_same_datatypes(), tlist_same_exprs(), tliSwitchPoint(), tokenize_inc_file(), TouchSocketFiles(), TouchSocketLockFiles(), transformAExprIn(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignmentIndirection(), transformBoolExpr(), transformCallStmt(), transformCaseExpr(), transformCheckConstraints(), transformCoalesceExpr(), transformColumnNameList(), transformConstraintAttrs(), transformCreateSchemaStmt(), transformCreateStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExpressionList(), transformFKConstraints(), transformFromClause(), transformFromClauseItem(), transformFuncCall(), transformGenericOptions(), transformGroupClause(), transformGroupClauseExpr(), transformGroupClauseList(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexConstraints(), transformIndexStmt(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformLockingClause(), transformMinMaxExpr(), transformPartitionBound(), transformPartitionRangeBounds(), transformPLAssignStmt(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRelOptions(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSortClause(), transformStatsStmt(), transformSubLink(), transformTargetList(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), translate_sub_tlist(), trim_mergeclauses_for_inner_pathkeys(), trivial_subqueryscan(), typenameTypeMod(), unaccent_init(), unify_hypothetical_args(), UnlinkLockFiles(), update_placeholder_eval_levels(), UpdateLogicalMappings(), use_physical_tlist(), UserMappingPasswordRequired(), validate_ddl_tags(), validate_table_rewrite_tags(), validateDomainConstraint(), ValuesNext(), verify_heapam(), view_cols_are_auto_updatable(), view_query_is_auto_updatable(), WaitForLockersMultiple(), XLogFileReadAnyTLI(), xmlconcat(), and xmlelement().

◆ lfirst_int

#define lfirst_int (   lc)    ((lc)->int_value)

Definition at line 170 of file pg_list.h.

Referenced by _equalList(), _outList(), adjust_inherited_attnums(), adjust_partition_colnos(), adjust_paths_for_srfs(), analyzeCTE(), ATPrepAlterColumnType(), ATRewriteTable(), BeginCopyFrom(), BeginCopyTo(), bms_overlap_list(), build_merged_partition_bounds(), build_subplan(), BuildDescFromLists(), buildNSItemFromLists(), BuildRelationExtStatistics(), buildSubPlanHash(), cleanup_rel_sync_cache(), cmp_list_len_contents_asc(), convert_prep_stmt_params(), CopyOneRowTo(), create_foreign_modify(), deparseDirectUpdateSql(), deparseInsertSql(), deparseUpdateSql(), distinct_col_search(), DoCopy(), DoCopyTo(), ExecBuildAggTrans(), ExecBuildGroupingEqual(), ExecBuildParamSetEqual(), ExecBuildUpdateProjection(), ExecEvalGroupingFunc(), ExecInitExprRec(), ExecInitModifyTable(), ExecInitQual(), ExecInitSubPlan(), ExecInitSubscriptingRef(), ExecReScanSetParamPlan(), ExecScanSubPlan(), ExecSetParamPlan(), expandRTE(), extract_rollup_sets(), extractRemainingColumns(), finalize_plan(), finalize_primnode(), find_all_inheritors(), find_compatible_trans(), find_expr_references_walker(), find_hash_columns(), find_param_referent(), fix_expr_common(), fix_indexorderby_references(), fix_indexqual_clause(), fix_merged_indexes(), get_from_clause_coldeflist(), get_matching_location(), get_rule_groupingset(), get_schema_sent_in_streamed_txn(), get_tablefunc(), identify_join_columns(), JumbleExpr(), list_concat_unique_int(), list_delete_int(), list_difference_int(), list_insert_nth_int(), list_int_cmp(), list_intersection_int(), list_member_int(), list_nth_int(), list_union_int(), make_modifytable(), make_tuple_from_result_row(), NextCopyFrom(), perform_pruning_combine_step(), postgresPlanDirectModify(), prepare_projection_slot(), preprocess_groupclause(), rebuildInsertSql(), remap_to_groupclause_idx(), rename_constraint_internal(), renameatt_internal(), set_param_references(), set_plan_refs(), show_grouping_set_keys(), SS_identify_outer_params(), TerminateOtherDBBackends(), transformDistinctOnClause(), transformInsertRow(), transformInsertStmt(), and transformSetOperationStmt().

◆ lfirst_node

#define lfirst_node (   type,
  lc 
)    castNode(type, lfirst(lc))

Definition at line 172 of file pg_list.h.

Referenced by _SPI_execute_plan(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), AcquireExecutorLocks(), AcquirePlannerLocks(), addFkRecurseReferencing(), AddRoleMems(), adjust_paths_for_srfs(), adjust_view_column_set(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), analyzeCTE(), apply_scanjoin_target_to_paths(), array_subscript_transform(), assign_aggregate_collations(), assign_collations_walker(), assign_ordered_set_collations(), ATExecSetIdentity(), ATParseTransformCmd(), ATPostAlterTypeParse(), ATRewriteCatalogs(), BeginCopyTo(), brincostestimate(), btcostestimate(), build_tlist_to_deparse(), BuildCachedPlan(), BuildParameterizedTidPaths(), buildRelationAliases(), cached_plan_cost(), CachedPlanAllowsSimpleValidityCheck(), calc_joinrel_size_estimate(), check_new_partition_bound(), check_sql_fn_retval(), check_sql_fn_statements(), classifyConditions(), CloneFkReferencing(), common_prefix_cmp(), compute_semi_anti_join_factors(), ComputePartitionAttrs(), consider_groupingsets_paths(), cost_tidscan(), cost_windowagg(), create_bitmap_scan_plan(), create_hashjoin_plan(), create_indexscan_plan(), create_list_bounds(), create_mergejoin_plan(), create_one_window_path(), create_tidrangescan_plan(), create_tidscan_plan(), CreateFunction(), CreateStatistics(), CreateTriggerFiringOn(), DefineAggregate(), DefineCollation(), DefineOpClass(), DefineQueryRewrite(), DefineView(), deparse_context_for_plan_tree(), deparseDirectUpdateSql(), deparseExplicitTargetList(), DropConfigurationMapping(), errdetail_execute(), eval_const_expressions_mutator(), exec_simple_query(), ExecBuildProjectionInfo(), ExecBuildUpdateProjection(), ExecCleanTargetListLength(), ExecCreatePartitionPruneState(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitPartitionInfo(), ExecInitSubPlan(), ExecInitValuesScan(), ExecResetTupleTable(), ExecSerializePlan(), execute_sql_string(), ExecVacuum(), ExplainExecuteQuery(), ExplainQuery(), expression_tree_walker(), exprTypmod(), extract_actual_clauses(), extract_actual_join_clauses(), extract_nonindex_conditions(), extract_or_clause(), final_cost_hashjoin(), find_param_referent(), fireRIRrules(), fix_indexqual_references(), fmgr_sql_validator(), foreign_expr_walker(), foreign_grouping_ok(), foreign_join_ok(), generate_bitmap_or_paths(), generateSerialExtraStmts(), get_actual_clauses(), get_non_null_list_datum_count(), get_number_of_groups(), get_object_address_opf_member(), get_qual_for_list(), get_qual_for_range(), get_quals_from_indexclauses(), get_range_partbound_string(), get_rule_expr(), get_sublink_expr(), get_tablefunc(), getTokenTypes(), gincostestimate(), have_partkey_equi_join(), ImportForeignSchema(), init_execution_state(), init_sql_fcache(), is_redundant_with_indexclauses(), jsonb_subscript_transform(), JumbleExpr(), JumbleRangeTable(), JumbleRowMarks(), LookupFuncWithArgs(), make_one_partition_rbound(), make_window_input_target(), match_clauses_to_index(), OpenTableList(), pg_plan_queries(), pg_rewrite_query(), plan_cluster_use_sort(), PlanCacheObjectCallback(), PlanCacheRelCallback(), planstate_walk_subplans(), PortalGetPrimaryStmt(), PortalRunMulti(), postgresGetForeignPlan(), postgresGetForeignRelSize(), postgresPlanDirectModify(), postprocess_setop_tlist(), preprocess_groupclause(), preprocess_grouping_sets(), preprocess_rowmarks(), print_function_sqlbody(), process_subquery_nestloop_params(), ProcessCopyOptions(), query_tree_mutator(), query_tree_walker(), QueryListGetPrimaryStmt(), range_table_walker(), raw_expression_tree_walker(), rel_is_distinct_for(), remap_to_groupclause_idx(), remove_useless_groupby_columns(), ResetPlanCache(), restriction_is_constant_false(), RewriteQuery(), roleSpecsToIds(), ScanQueryForLocks(), select_active_windows(), set_plan_references(), set_subquery_size_estimates(), setup_simple_rel_arrays(), SPI_cursor_open_internal(), standard_planner(), subquery_planner(), tfuncInitialize(), TidQualFromRestrictInfoList(), TidRangeQualFromRestrictInfoList(), transformAlterTableStmt(), transformCaseExpr(), transformColumnDefinition(), transformContainerSubscripts(), transformIndexConstraint(), transformIndexConstraints(), transformInsertRow(), transformInsertStmt(), transformPartitionBound(), transformPartitionSpec(), transformRangeTableFunc(), transformUpdateTargetList(), transformXmlExpr(), translate_col_privs(), try_partitionwise_join(), type_in_list_does_not_exist_skipping(), TypeNameListToString(), update_proconfig_value(), vacuum(), and validateInfiniteBounds().

◆ lfirst_oid

#define lfirst_oid (   lc)    ((lc)->oid_value)

Definition at line 171 of file pg_list.h.

Referenced by _equalList(), _outList(), acquire_inherited_sample_rows(), AddRoleMems(), AfterTriggerSetState(), AlterIndexNamespaces(), AlterPublicationTables(), AlterTableMoveAll(), analyzeCTE(), apply_handle_truncate(), ApplyExtensionUpdates(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATCheckPartitionsNotInUse(), ATDetachCheckNoForeignKeyRefs(), ATExecAddColumn(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropNotNull(), ATExecSetTableSpace(), ATExecValidateConstraint(), ATPostAlterTypeCleanup(), ATPrepAlterColumnType(), ATSimpleRecursion(), AttachPartitionEnsureIndexes(), ATTypedTableRecursion(), BuildDescFromLists(), buildNSItemFromLists(), calculate_indexes_size(), calculate_toast_table_size(), check_default_partition_contents(), check_functions_in_node(), CloneFkReferenced(), CloneFkReferencing(), cluster(), CollationGetCollid(), compare_tlist_datatypes(), contain_leaked_vars_walker(), ConversionGetConid(), convert_EXISTS_to_ANY(), cost_qual_eval_walker(), create_memoize_plan(), create_unique_plan(), CreateFunction(), CreateTriggerFiringOn(), current_schemas(), database_to_xml_internal(), database_to_xmlschema_internal(), DefineIndex(), DefineRelation(), DelRoleMems(), DetachPartitionFinalize(), distinct_col_search(), do_autovacuum(), DropOwnedObjects(), EventTriggerInvoke(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecHashTableCreate(), ExecIndexBuildScanKeys(), ExecInitExprRec(), ExecInitIndexScan(), ExecInitPartitionInfo(), ExecOpenIndices(), ExecRefreshMatView(), execute_extension_script(), ExecuteTruncate(), ExecuteTruncateGuts(), expand_indexqual_rowcompare(), expand_inherited_rtentry(), expand_vacuum_rel(), expandRTE(), expandTableLikeClause(), fetch_search_path_array(), find_all_inheritors(), find_expr_references_walker(), FindDefaultConversionProc(), FuncnameGetCandidates(), generate_append_tlist(), generate_setop_tlist(), get_aggregate_argtypes(), get_collation_oid(), get_conversion_oid(), get_from_clause_coldeflist(), get_rel_sync_entry(), get_relation_info(), get_relation_statistics(), get_statistics_object_oid(), get_tablefunc(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), GetPubPartitionOptionRelations(), GetRelationPublicationActions(), heap_truncate(), heap_truncate_check_FKs(), heap_truncate_find_FKs(), index_concurrently_swap(), index_get_partition(), infer_arbiter_indexes(), InsertExtensionTuple(), InvalidatePublicationRels(), list_concat_unique_oid(), list_delete_oid(), list_difference_oid(), list_insert_nth_oid(), list_member_oid(), list_nth_oid(), list_oid_cmp(), list_union_oid(), LockTableRecurse(), map_sql_catalog_to_xmlschema_types(), map_sql_schema_to_xmlschema_types(), map_sql_typecoll_to_xmlschema_types(), mark_index_clustered(), merge_acl_with_grant(), MergeAttributes(), OpclassnameGetOpcid(), OpenTableList(), OpernameGetCandidates(), OpernameGetOprid(), OpfamilynameGetOpfid(), OverrideSearchPathMatchesCurrent(), perform_pruning_base_step(), pg_partition_tree(), PreCommit_on_commit_actions(), ProcessUtilitySlow(), ReassignOwnedObjects(), refresh_by_match_merge(), reindex_relation(), ReindexMultipleInternal(), ReindexPartitions(), ReindexRelationConcurrently(), relation_has_unique_index_for(), relation_mark_replica_identity(), RelationBuildPartitionDesc(), RelationGetIndexAttrBitmap(), relationHasPrimaryKey(), RelationIsVisible(), RelationTruncateIndexes(), RelnameGetRelid(), remove_dbtablespaces(), rename_constraint_internal(), renameatt_internal(), roles_is_member_of(), schema_to_xml_internal(), schema_to_xmlschema_internal(), select_best_grantor(), select_equality_operator(), sepgsql_dml_privileges(), SerializeReindexState(), SetIndexStorageProperties(), shdepDropOwned(), shdepReassignOwned(), show_modifytable_info(), StatisticsObjIsVisible(), StoreCatalogInheritance(), tlist_same_collations(), tlist_same_datatypes(), toast_open_indexes(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformRangeTableSample(), transformSetOperationStmt(), transformTableLikeClause(), triggered_change_notification(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), typeInheritsFrom(), TypeIsVisible(), TypenameGetTypidExtended(), and vac_open_indexes().

◆ lfourth

#define lfourth (   l)    lfirst(list_nth_cell(l, 3))

Definition at line 189 of file pg_list.h.

Referenced by get_func_sql_syntax(), LookupTypeNameExtended(), and transformColumnRef().

◆ lfourth_int

#define lfourth_int (   l)    lfirst_int(list_nth_cell(l, 3))

Definition at line 190 of file pg_list.h.

◆ lfourth_node

#define lfourth_node (   type,
 
)    castNode(type, lfourth(l))

Definition at line 192 of file pg_list.h.

◆ lfourth_oid

#define lfourth_oid (   l)    lfirst_oid(list_nth_cell(l, 3))

Definition at line 191 of file pg_list.h.

◆ linitial

#define linitial (   l)    lfirst(list_nth_cell(l, 0))

Definition at line 174 of file pg_list.h.

Referenced by add_paths_to_append_rel(), add_security_quals(), add_with_check_options(), addRangeTableEntryForFunction(), addRangeTableEntryForValues(), AddRelationNewConstraints(), agg_refill_hash_table(), ApplyRetrieveRule(), array_unnest_support(), ATColumnChangeRequiresRewrite(), AtEOSubXact_Namespace(), AtEOXact_Namespace(), bernoulli_samplescangetsamplesize(), bitmap_subplan_mark_shared(), build_partition_pathkeys(), build_subplan(), can_minmax_aggs(), check_hashjoinable(), check_memoizable(), check_mergejoinable(), check_new_partition_bound(), check_sql_fn_retval(), choose_bitmap_and(), ChoosePortalStrategy(), clause_is_strict_for(), clauselist_selectivity_ext(), commute_restrictinfo(), CommuteOpExpr(), compute_semijoin_info(), consider_groupingsets_paths(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), CopyMultiInsertInfoFlush(), cost_append(), cost_incremental_sort(), cost_qual_eval_walker(), create_append_path(), create_bitmap_subplan(), create_groupingsets_path(), create_groupingsets_plan(), create_hashjoin_plan(), create_ordered_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), CreateCommandTag(), currtid_for_view(), deconstruct_recurse(), DeconstructQualifiedName(), deparseBoolExpr(), deparseDistinctExpr(), deparseFuncExpr(), deparseOpExpr(), deparseScalarArrayOpExpr(), dependency_is_compatible_clause(), dependency_is_compatible_expression(), does_not_exist_skipping(), estimate_num_groups(), eval_const_expressions_mutator(), examine_opclause_args(), exec_simple_check_plan(), ExecBuildAggTrans(), ExecIndexBuildScanKeys(), ExecInitExprRec(), ExecInitModifyTable(), ExecInitPartitionInfo(), ExecInitSubPlan(), ExecInitValuesScan(), ExecSecLabelStmt(), ExecSupportsMarkRestore(), expand_grouping_sets(), expand_indexqual_rowcompare(), ExpandColumnRefStar(), ExplainTargetRel(), exprCollation(), exprType(), exprTypmod(), extract_jsp_path_expr(), extract_not_arg(), extract_strong_not_arg(), FigureColnameInternal(), find_duplicate_ors(), find_param_referent(), findTargetlistEntrySQL92(), fix_indexqual_clause(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), fmgr_sql_validator(), foreign_expr_walker(), FreeExecutorState(), func_get_detail(), gather_grouping_paths(), gen_partprune_steps_internal(), generate_base_implied_equalities_const(), generate_gather_paths(), generate_join_implied_equalities_normal(), generate_series_int4_support(), generate_series_int8_support(), generate_union_paths(), generate_useful_gather_paths(), get_from_clause_item(), get_func_expr(), get_func_sql_syntax(), get_join_variables(), get_leftop(), get_notclausearg(), get_object_address_defacl(), get_object_address_opcf(), get_object_address_opf_member(), get_object_address_publication_rel(), get_object_address_usermapping(), get_oper_expr(), get_partition_qual_relid(), get_qual_for_list(), get_qual_for_range(), get_restriction_variable(), get_rtable_name(), get_rule_expr(), get_simple_binary_op_name(), get_singleton_append_subpath(), get_sublink_expr(), get_update_query_targetlist_def(), get_useful_pathkeys_for_relation(), get_view_query(), getInsertSelectQuery(), gimme_tree(), gistEmptyAllBuffers(), gistFindPath(), gistfinishsplit(), gistProcessEmptyingQueue(), hash_inner_and_outer(), hash_ok_operator(), have_partkey_equi_join(), initial_cost_mergejoin(), inline_function(), inline_set_returning_function(), interpret_AS_clause(), interval_support(), is_dummy_rel(), is_safe_append_member(), is_simple_values(), IsBinaryTidClause(), isSimpleNode(), IsTidEqualAnyClause(), JsonValueListHead(), JsonValueListInitIterator(), lcons(), like_regex_support(), llvm_release_context(), LookupTypeNameExtended(), make_ands_explicit(), make_callstmt_target(), make_partition_op_expr(), make_rel_from_joinlist(), make_row_comparison_op(), make_ruledef(), make_unique_from_pathkeys(), make_viewdef(), makeRangeVarFromNameList(), makeWholeRowVar(), match_clause_to_partition_key(), match_opclause_to_indexcol(), match_rowcompare_to_indexcol(), match_saopclause_to_indexcol(), matches_boolean_partition_clause(), MJExamineQuals(), negate_clause(), network_subset_support(), numeric_support(), operator_predicate_proof(), ordered_set_startup(), paraminfo_get_equal_hashops(), parse_hba_line(), parse_ident_line(), parseCheckAggregates(), ParseFuncOrColumn(), perform_base_backup(), pg_get_object_address(), plan_union_children(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), PLy_abort_open_subtransactions(), PLy_subtransaction_exit(), PopOverrideSearchPath(), predicate_implied_by(), predicate_refuted_by(), prepare_sort_from_pathkeys(), preprocess_aggref(), preprocess_minmax_aggregates(), print_function_sqlbody(), process_duplicate_ors(), process_owned_by(), processIndirection(), processState(), processTypesSpec(), ProcessUtilitySlow(), pull_up_simple_subquery(), pull_up_simple_values(), pull_up_sublinks_qual_recurse(), query_is_distinct_for(), query_planner(), QueuePartitionConstraintValidation(), reconsider_full_join_clause(), recurse_set_operations(), reduce_outer_joins_pass2(), refresh_matview_datafill(), regnamespacein(), regrolein(), relation_excluded_by_constraints(), relation_is_updatable(), remove_useless_results_recurse(), replace_domain_constraint_value(), resolve_column_ref(), RewriteQuery(), rewriteTargetView(), rewriteValuesRTE(), rowcomparesel(), scalararraysel(), select_common_type(), set_append_references(), set_deparse_context_plan(), set_deparse_plan(), set_mergeappend_references(), set_plan_refs(), simplify_and_arguments(), simplify_boolean_equality(), simplify_or_arguments(), sort_inner_and_outer(), SPI_cursor_open_internal(), SPI_is_cursor_plan(), SPI_plan_get_cached_plan(), sql_fn_post_column_ref(), standard_join_search(), StandbyReleaseLockList(), strip_implicit_coercions(), SyncPostCheckpoint(), system_rows_samplescangetsamplesize(), system_samplescangetsamplesize(), system_time_samplescangetsamplesize(), TemporalSimplify(), test_opexpr_is_hashable(), test_support_func(), TidExprListCreate(), to_regnamespace(), to_regrole(), transformAExprBetween(), transformAExprIn(), transformAExprNullIf(), transformAExprOp(), transformAssignedExpr(), transformColumnDefinition(), transformColumnRef(), transformDeclareCursorStmt(), transformGraph(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformPartitionBound(), transformPartitionRangeBounds(), transformPLAssignStmt(), transformRangeFunction(), transformReturningList(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformValuesClause(), TypeGetTupleDesc(), typenameTypeMod(), varbit_support(), varchar_support(), and view_query_is_auto_updatable().

◆ linitial_int

◆ linitial_node

◆ linitial_oid

◆ list_make1

#define list_make1 (   x1)    list_make1_impl(T_List, list_make_ptr_cell(x1))

Definition at line 206 of file pg_list.h.

Referenced by add_dummy_return(), add_paths_to_append_rel(), add_predicate_to_index_quals(), Async_Notify(), ATAddCheckConstraint(), ATExecAddColumn(), ATExecAttachPartition(), ATExecColumnDefault(), ATExecDetachPartition(), ATParseTransformCmd(), autovacuum_do_vac_analyze(), build_aggregate_finalfn_expr(), build_aggregate_serialfn_expr(), build_aggregate_transfn_expr(), build_coercion_expression(), build_expression_pathkey(), build_minmax_path(), BuildEventTriggerCache(), BuildParameterizedTidPaths(), check_index_predicates(), check_sql_fn_retval(), choose_bitmap_and(), consider_groupingsets_paths(), convert_combining_aggrefs(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_edata_for_relation(), create_indexscan_plan(), create_tidscan_plan(), CreateRole(), deconstruct_recurse(), defGetQualifiedName(), defGetTypeName(), DefineViewRules(), DefineVirtualRelation(), deparse_context_for(), deparse_context_for_plan_tree(), DoCopy(), does_not_exist_skipping(), eval_const_expressions_mutator(), ExecInitSubPlan(), ExecSetVariableStmt(), expand_groupingset_node(), expand_indexqual_rowcompare(), ExplainNode(), extract_rollup_sets(), fileGetForeignPaths(), find_forced_null_vars(), find_nonnullable_vars_walker(), flatten_simple_union_all(), fmgr_sql_validator(), foreign_grouping_ok(), FunctionIsVisible(), gen_partprune_steps_internal(), generate_bitmap_or_paths(), generate_function_name(), generate_operator_name(), generateClonedExtStatsStmt(), generateSerialExtraStmts(), get_proposed_default_constraint(), get_qual_for_hash(), get_qual_for_list(), get_qual_for_range(), get_steps_using_prefix(), get_useful_pathkeys_for_relation(), getObjectIdentityParts(), gistFindPath(), grouping_planner(), hstore_subscript_transform(), init_sql_fcache(), inline_function(), inline_set_returning_function(), interpret_AS_clause(), JsonValueListGetList(), list_insert_nth(), make_ands_implicit(), make_notclause(), make_op(), make_opclause(), make_path_cat_expr(), make_path_initial_array(), make_ruledef(), makeSimpleA_Expr(), makeTypeName(), map_sql_table_to_xmlschema(), match_boolean_index_clause(), match_clause_to_indexcol(), match_clause_to_partition_key(), match_network_subset(), match_opclause_to_indexcol(), match_pattern_prefix(), match_saopclause_to_indexcol(), mcv_clause_selectivity_or(), NotNullImpliedByRelConstraints(), OperatorIsVisible(), PerformCursorOpen(), pg_get_triggerdef_worker(), pg_rewrite_query(), plan_cluster_use_sort(), plan_create_index_workers(), plan_union_children(), print_function_sqlbody(), process_duplicate_ors(), process_equivalence(), pull_up_constant_function(), pull_up_simple_values(), pull_up_sublinks(), queue_listen(), readTimeLineHistory(), recordDependencyOnExpr(), recordDependencyOnSingleRelExpr(), regoperout(), regprocout(), remove_useless_results_recurse(), replace_empty_jointree(), resolve_unique_index_expr(), rewriteSearchAndCycle(), selectColorTrigrams(), set_baserel_partition_key_exprs(), split_pathtarget_at_srfs(), sql_fn_post_column_ref(), standard_ProcessUtility(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), TidQualFromRestrictInfo(), transformAExprDistinct(), transformAExprIn(), transformAlterTableStmt(), transformAssignmentIndirection(), transformColumnDefinition(), transformColumnRef(), transformCurrentOfExpr(), transformFromClauseItem(), transformGroupClause(), transformIndexConstraints(), transformIndirection(), transformPLAssignStmt(), transformRangeFunction(), transformReturnStmt(), transformRuleStmt(), transformSubLink(), transformValuesClause(), transformXmlSerialize(), and WaitForLockers().

◆ list_make1_int

◆ list_make1_oid

◆ list_make2

◆ list_make2_int

#define list_make2_int (   x1,
  x2 
)    list_make2_impl(T_IntList, list_make_int_cell(x1), list_make_int_cell(x2))

Definition at line 223 of file pg_list.h.

◆ list_make2_oid

#define list_make2_oid (   x1,
  x2 
)    list_make2_impl(T_OidList, list_make_oid_cell(x1), list_make_oid_cell(x2))

Definition at line 238 of file pg_list.h.

◆ list_make3

#define list_make3 (   x1,
  x2,
  x3 
)

◆ list_make3_int

#define list_make3_int (   x1,
  x2,
  x3 
)
Value:
List * list_make3_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3)
Definition: list.c:254
#define list_make_int_cell(v)
Definition: pg_list.h:203

Definition at line 225 of file pg_list.h.

◆ list_make3_oid

#define list_make3_oid (   x1,
  x2,
  x3 
)
Value:
List * list_make3_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3)
Definition: list.c:254
#define list_make_oid_cell(v)
Definition: pg_list.h:204

Definition at line 240 of file pg_list.h.

◆ list_make4

#define list_make4 (   x1,
  x2,
  x3,
  x4 
)
Value:
List * list_make4_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4)
Definition: list.c:267
#define list_make_ptr_cell(v)
Definition: pg_list.h:202
Definition: nodes.h:301

Definition at line 213 of file pg_list.h.

Referenced by postgresPlanDirectModify().

◆ list_make4_int

#define list_make4_int (   x1,
  x2,
  x3,
  x4 
)
Value:
List * list_make4_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4)
Definition: list.c:267
#define list_make_int_cell(v)
Definition: pg_list.h:203

Definition at line 228 of file pg_list.h.

◆ list_make4_oid

#define list_make4_oid (   x1,
  x2,
  x3,
  x4 
)
Value:
List * list_make4_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4)
Definition: list.c:267
#define list_make_oid_cell(v)
Definition: pg_list.h:204

Definition at line 243 of file pg_list.h.

◆ list_make5

#define list_make5 (   x1,
  x2,
  x3,
  x4,
  x5 
)
Value:
#define list_make_ptr_cell(v)
Definition: pg_list.h:202
Definition: nodes.h:301
List * list_make5_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4, ListCell datum5)
Definition: list.c:281

Definition at line 216 of file pg_list.h.

Referenced by postgresPlanForeignModify().

◆ list_make5_int

#define list_make5_int (   x1,
  x2,
  x3,
  x4,
  x5 
)
Value:
List * list_make5_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4, ListCell datum5)
Definition: list.c:281
#define list_make_int_cell(v)
Definition: pg_list.h:203

Definition at line 231 of file pg_list.h.

◆ list_make5_oid

#define list_make5_oid (   x1,
  x2,
  x3,
  x4,
  x5 
)
Value:
#define list_make_oid_cell(v)
Definition: pg_list.h:204
List * list_make5_impl(NodeTag t, ListCell datum1, ListCell datum2, ListCell datum3, ListCell datum4, ListCell datum5)
Definition: list.c:281

Definition at line 246 of file pg_list.h.

◆ list_make_int_cell

#define list_make_int_cell (   v)    ((ListCell) {.int_value = (v)})

Definition at line 203 of file pg_list.h.

◆ list_make_oid_cell

#define list_make_oid_cell (   v)    ((ListCell) {.oid_value = (v)})

Definition at line 204 of file pg_list.h.

◆ list_make_ptr_cell

#define list_make_ptr_cell (   v)    ((ListCell) {.ptr_value = (v)})

Definition at line 202 of file pg_list.h.

◆ list_nth_node

#define list_nth_node (   type,
  list,
 
)    castNode(type, list_nth(list, n))

◆ llast

◆ llast_int

#define llast_int (   l)    lfirst_int(list_last_cell(l))

Definition at line 195 of file pg_list.h.

Referenced by add_merged_range_bounds(), and lappend_int().

◆ llast_node

#define llast_node (   type,
 
)    castNode(type, llast(l))

Definition at line 197 of file pg_list.h.

Referenced by apply_scanjoin_target_to_paths().

◆ llast_oid

#define llast_oid (   l)    lfirst_oid(list_last_cell(l))

Definition at line 196 of file pg_list.h.

Referenced by get_rel_sync_entry(), lappend_oid(), and pg_partition_root().

◆ lsecond

#define lsecond (   l)    lfirst(list_nth_cell(l, 1))

Definition at line 179 of file pg_list.h.

Referenced by arrayconst_startup_fn(), arrayexpr_next_fn(), arrayexpr_startup_fn(), btcostestimate(), clause_is_strict_for(), clauselist_selectivity_ext(), commute_restrictinfo(), CommuteOpExpr(), compute_semijoin_info(), convert_EXISTS_to_ANY(), convert_saop_to_hashed_saop_walker(), cost_qual_eval_walker(), cost_tidscan(), create_hashjoin_plan(), DeconstructQualifiedName(), DefineAggregate(), deparseCaseExpr(), deparseDistinctExpr(), deparseScalarArrayOpExpr(), dependency_is_compatible_clause(), dependency_is_compatible_expression(), does_not_exist_skipping(), examine_opclause_args(), ExecIndexBuildScanKeys(), ExecInitExprRec(), ExecInitSubPlan(), ExpandColumnRefStar(), exprIsLengthCoercion(), generate_series_int4_support(), generate_series_int8_support(), genericcostestimate(), get_func_sql_syntax(), get_join_variables(), get_object_address(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_publication_rel(), get_object_address_usermapping(), get_oper_expr(), get_restriction_variable(), get_rightop(), get_rule_expr(), get_simple_binary_op_name(), get_sublink_expr(), gincost_opexpr(), gincost_scalararrayopexpr(), gistfinishsplit(), have_partkey_equi_join(), index_other_operands_eval_cost(), interpret_AS_clause(), interval_support(), is_strict_saop(), IsBinaryTidClause(), IsTidEqualAnyClause(), like_regex_support(), LookupTypeNameExtended(), make_row_comparison_op(), makeRangeVarFromNameList(), match_clause_to_partition_key(), match_opclause_to_indexcol(), match_saopclause_to_indexcol(), MJExamineQuals(), network_subset_support(), numeric_support(), operator_predicate_proof(), paraminfo_get_equal_hashops(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), predicate_classify(), processTypesSpec(), reconsider_full_join_clause(), reduce_outer_joins_pass2(), resolve_column_ref(), scalararraysel(), simplify_boolean_equality(), sql_fn_post_column_ref(), TemporalSimplify(), test_opexpr_is_hashable(), test_support_func(), TidExprListCreate(), transformAExprBetween(), transformColumnRef(), transformRangeFunction(), varbit_support(), and varchar_support().

◆ lsecond_int

#define lsecond_int (   l)    lfirst_int(list_nth_cell(l, 1))

Definition at line 180 of file pg_list.h.

◆ lsecond_node

#define lsecond_node (   type,
 
)    castNode(type, lsecond(l))

◆ lsecond_oid

#define lsecond_oid (   l)    lfirst_oid(list_nth_cell(l, 1))

Definition at line 181 of file pg_list.h.

◆ lthird

◆ lthird_int

#define lthird_int (   l)    lfirst_int(list_nth_cell(l, 2))

Definition at line 185 of file pg_list.h.

◆ lthird_node

#define lthird_node (   type,
 
)    castNode(type, lthird(l))

Definition at line 187 of file pg_list.h.

Referenced by get_rule_expr().

◆ lthird_oid

#define lthird_oid (   l)    lfirst_oid(list_nth_cell(l, 2))

Definition at line 186 of file pg_list.h.

◆ multi_for_advance_cell

#define multi_for_advance_cell (   cell,
  state,
  l,
  i 
)
Value:
(cell = (state.l != NIL && state.i < state.l->length) ? \
&state.l->elements[state.i] : NULL)
#define NIL
Definition: pg_list.h:65
Definition: regguts.h:317

Definition at line 453 of file pg_list.h.

◆ NIL

#define NIL   ((List *) NULL)

Definition at line 65 of file pg_list.h.

Referenced by _copyRestrictInfo(), _SPI_execute_plan(), _SPI_make_plan_non_temp(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), AcquireRewriteLocks(), add_dummy_return(), add_foreign_final_paths(), add_foreign_grouping_paths(), add_foreign_ordered_paths(), add_path(), add_path_precheck(), add_paths_to_append_rel(), add_paths_to_grouping_rel(), add_paths_to_joinrel(), add_paths_with_pathkeys_for_rel(), add_predicate_to_index_quals(), add_rte_to_flat_rtable(), add_security_quals(), add_with_check_options(), AddEventToPendingNotifies(), addFkRecurseReferenced(), addFkRecurseReferencing(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addTargetToSortList(), adjust_appendrel_attrs_mutator(), adjust_inherited_attnums(), adjust_partition_colnos(), AfterTriggerEnlargeQueryState(), AfterTriggerFreeQuery(), AfterTriggerSetState(), agg_refill_hash_table(), AlterDomainDefault(), AlterFunction(), AlterOperator(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), AlterPolicy(), AlterPublicationTables(), AlterRole(), AlterTableGetRelOptionsLockLevel(), AlterTableMoveAll(), AlterTSDictionary(), analyzeCTE(), analyzeCTETargetList(), appendTypeNameToBuffer(), apply_child_basequals(), apply_handle_delete_internal(), apply_handle_truncate(), apply_handle_tuple_routing(), apply_handle_update_internal(), apply_scanjoin_target_to_paths(), ApplyExtensionUpdates(), approx_tuple_count(), array_subscript_transform(), assign_aggregate_collations(), assign_collations_walker(), asyncQueueUnregister(), AtAbort_Notify(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtCommit_Notify(), ATController(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAlterColumnGenericOptions(), ATExecAlterConstraint(), ATExecColumnDefault(), ATExecDropConstraint(), ATExecGenericOptions(), ATExecReplicaIdentity(), ATExecSetRelOptions(), ATExecSetTableSpace(), ATExecValidateConstraint(), ATPostAlterTypeParse(), ATPrepAlterColumnType(), ATRewriteCatalogs(), ATRewriteTable(), ATRewriteTables(), autovacuum_do_vac_analyze(), BeginCopyTo(), binary_upgrade_create_empty_extension(), bitmap_scan_cost_est(), bms_overlap_list(), boot_get_type_io_data(), boot_openrel(), btcostestimate(), btvalidate(), build_base_rel_tlists(), build_child_join_rel(), build_expression_pathkey(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_pathkeys(), build_join_rel(), build_joinrel_joinlist(), build_joinrel_restrictlist(), build_merged_partition_bounds(), build_minmax_path(), build_partition_pathkeys(), build_path_tlist(), build_paths_for_OR(), build_pertrans_for_aggref(), build_physical_tlist(), build_remote_returning(), build_simple_rel(), build_subplan(), build_tlist_to_deparse(), BuildCachedPlan(), BuildDummyIndexInfo(), BuildOnConflictExcludedTargetlist(), buildRelationAliases(), BuildRelationExtStatistics(), CachedPlanGetTargetList(), calc_joinrel_size_estimate(), can_minmax_aggs(), can_partial_agg(), CatalogIndexInsert(), check_agglevels_and_constraints(), check_equivalence_delay(), check_index_predicates(), check_outerjoin_delay(), check_selective_binary_conversion(), check_sql_fn_retval(), check_sql_fn_statements(), CheckAttributeNamesTypes(), CheckIndexCompatible(), checkInsertTargets(), CheckSelectLocking(), checkSharedDependencies(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), choose_bitmap_and(), choose_hashed_setop(), ChooseIndexColumnNames(), ChooseIndexName(), ChoosePortalStrategy(), classify_index_clause_usage(), classifyConditions(), clauselist_apply_dependencies(), clauselist_selectivity_ext(), clauselist_selectivity_or(), CloneFkReferenced(), CloneFkReferencing(), CloneRowTriggersToPartition(), coerce_record_to_complex(), CommandIsReadOnly(), commute_restrictinfo(), CompareIndexInfo(), compile_plperl_function(), compute_function_attributes(), compute_index_stats(), compute_return_type(), compute_semi_anti_join_factors(), compute_semijoin_info(), ComputePartitionAttrs(), consider_groupingsets_paths(), consider_index_join_clauses(), consider_new_or_clause(), ConstructTupleDescriptor(), contain_dml_walker(), convert_ANY_sublink_to_join(), convert_combining_aggrefs(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_prep_stmt_params(), convert_subquery_pathkeys(), copy_table(), CopyFrom(), CopyGetAttnums(), CopyMultiInsertBufferFlush(), CopyMultiInsertInfoInit(), cost_append(), cost_incremental_sort(), cost_subplan(), create_agg_path(), create_agg_plan(), create_append_path(), create_append_plan(), create_bitmap_and_path(), create_bitmap_heap_path(), create_bitmap_or_path(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_ctas_internal(), create_ctas_nodata(), create_ctescan_path(), create_customscan_plan(), create_degenerate_grouping_paths(), create_distinct_paths(), create_final_distinct_paths(), create_gather_merge_plan(), create_gather_path(), create_gather_plan(), create_group_result_path(), create_grouping_paths(), create_groupingsets_path(), create_groupingsets_plan(), create_hashjoin_path(), create_hashjoin_plan(), create_index_paths(), create_indexscan_plan(), create_join_plan(), create_lockrows_path(), create_logical_replication_slot(), create_memoize_plan(), create_merge_append_plan(), create_mergejoin_plan(), create_minmaxagg_path(), create_minmaxagg_plan(), create_modifytable_path(), create_namedtuplestorescan_path(), create_nestloop_path(), create_nestloop_plan(), create_ordered_paths(), create_ordinary_grouping_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_partitionwise_grouping_paths(), create_plan(), create_recursiveunion_path(), create_resultscan_path(), create_samplescan_path(), create_scan_plan(), create_seqscan_path(), create_setop_path(), create_tablefuncscan_path(), create_tidrangescan_path(), create_tidrangescan_plan(), create_tidscan_path(), create_tidscan_paths(), create_tidscan_plan(), create_toast_table(), create_unique_path(), create_unique_plan(), create_valuesscan_path(), create_worktablescan_path(), CreateCachedPlan(), CreateCommandTag(), CreateExecutorState(), CreateExtension(), CreateExtensionInternal(), CreateFKCheckTrigger(), createForeignKeyActionTriggers(), CreateFunction(), CreateInitDecodingContext(), CreateLockFile(), CreateOneShotCachedPlan(), CreateReplicationSlot(), CreateRole(), CreateStatistics(), CreateSubscription(), CreateTriggerFiringOn(), current_schema(), database_to_xmlschema_internal(), dccref_deletion_callback(), deconstruct_jointree(), deconstruct_recurse(), defGetQualifiedName(), DefineAggregate(), DefineAttr(), DefineCompositeType(), DefineDomain(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineSequence(), DefineTSDictionary(), DefineType(), DefineView(), DefineVirtualRelation(), deparse_context_for(), deparse_context_for_plan_tree(), deparse_expression_pretty(), deparseAggref(), deparseAnalyzeSql(), deparseArrayExpr(), deparseDeleteSql(), deparseDirectDeleteSql(), deparseDirectUpdateSql(), deparseExplicitTargetList(), deparseFromExpr(), deparseFromExprForRel(), deparseRangeTblRef(), deparseReturningList(), deparseTargetList(), dependencies_clauselist_selectivity(), deserialize_deflist(), determineRecursiveColTypes(), DiscardAll(), distribute_row_identity_vars(), do_analyze_rel(), do_autovacuum(), DoCopy(), domainAddConstraint(), DropSubscription(), dump_dynexecute(), dump_dynfors(), dump_if(), dump_open(), dump_return_query(), estimate_expression_value(), estimate_multivariate_ndistinct(), estimate_num_groups(), estimate_path_cost_size(), eval_const_expressions(), eval_const_expressions_mutator(), EvalPlanQualBegin(), EvalPlanQualEnd(), EvalPlanQualInit(), EvalPlanQualStart(), EventCacheLookup(), EventTriggerAlterTableStart(), EventTriggerBeginCompleteQuery(), EventTriggerCollectGrant(), EventTriggerCommonSetup(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), EventTriggerTableRewrite(), examine_simple_variable(), examine_variable(), exec_eval_using_params(), exec_execute_message(), exec_parse_message(), exec_simple_check_plan(), exec_stmt_raise(), exec_stmts(), Exec_UnlistenAllCommit(), ExecAlterDefaultPrivilegesStmt(), ExecARDeleteTriggers(), ExecASDeleteTriggers(), ExecASInsertTriggers(), ExecASTruncateTriggers(), ExecASUpdateTriggers(), ExecBatchInsert(), ExecBuildAggTrans(), ExecBuildGroupingEqual(), ExecBuildParamSetEqual(), ExecCheckIndexConstraints(), ExecEvalXmlExpr(), ExecHashSubPlan(), ExecInitAgg(), ExecInitBitmapHeapScan(), ExecInitCheck(), ExecInitCustomScan(), ExecInitExprList(), ExecInitExprRec(), ExecInitForeignScan(), ExecInitHash(), ExecInitInsertProjection(), ExecInitLockRows(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitNode(), ExecInitPartitionDispatchInfo(), ExecInitPartitionInfo(), ExecInitProjectSet(), ExecInitQual(), ExecInitRecursiveUnion(), ExecInitSubPlan(), ExecInitSubscriptingRef(), ExecInitWindowAgg(), ExecInsert(), ExecInsertIndexTuples(), ExecModifyTable(), ExecOnConflictUpdate(), ExecPrepareExprList(), ExecReScanSetParamPlan(), ExecSecLabelStmt(), ExecSerializePlan(), ExecSetParamPlan(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), ExecSubPlan(), ExecUpdate(), ExecuteGrantStmt(), ExecuteTruncate(), ExecuteTruncateGuts(), ExecVacuum(), expand_grouping_sets(), expand_groupingset_node(), expand_indexqual_rowcompare(), expand_inherited_rtentry(), expand_insert_targetlist(), expand_single_inheritance_child(), expand_vacuum_rel(), ExpandAllTables(), expandNSItemAttrs(), expandNSItemVars(), ExpandRowReference(), expandRTE(), expandTableLikeClause(), ExplainNode(), ExplainPrintPlan(), ExplainPrintTriggers(), ExplainQuery(), expression_planner_with_deps(), expression_tree_mutator(), exprTypmod(), extract_actual_clauses(), extract_actual_join_clauses(), extract_jsp_path_expr_nodes(), extract_lateral_references(), extract_nonindex_conditions(), extract_or_clause(), extract_query_dependencies(), extract_rollup_sets(), extract_update_targetlist_colnos(), ExtractExtensionList(), fetch_statentries_for_relation(), fetch_table_list(), fetch_upper_rel(), FetchPortalTargetList(), FetchStatementTargetList(), FetchTableStates(), file_acquire_sample_rows(), file_fdw_validator(), fileBeginForeignScan(), fileGetForeignPaths(), fileGetForeignPlan(), fileGetOptions(), fileReScanForeignScan(), fill_hba_line(), fill_hba_view(), final_cost_mergejoin(), finalize_grouping_exprs(), finalize_grouping_exprs_walker(), find_compatible_agg(), find_duplicate_ors(), find_forced_null_vars(), find_hash_columns(), find_inheritance_children_extended(), find_install_path(), find_mergeclauses_for_outer_pathkeys(), find_nonnullable_vars_walker(), find_param_referent(), find_typed_table_dependencies(), find_update_path(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), fireRIRrules(), fireRules(), fix_alternative_subplan(), fix_expr_common(), fix_indexorderby_references(), fix_indexqual_references(), fix_scan_expr(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_grouping_sets(), flatten_join_alias_vars_mutator(), flatten_set_variable_args(), flatten_simple_union_all(), fmgr_sql_validator(), foreign_grouping_ok(), foreign_join_ok(), format_operator_parts(), format_procedure_parts(), FormIndexDatum(), FormPartitionKeyDatum(), func_get_detail(), FuncnameGetCandidates(), FunctionIsVisible(), gen_partprune_steps_internal(), gen_prune_steps_from_opexps(), generate_append_tlist(), generate_bitmap_or_paths(), generate_function_name(), generate_gather_paths(), generate_implied_equalities_for_column(), generate_join_implied_equalities(), generate_join_implied_equalities_broken(), generate_join_implied_equalities_for_ecs(), generate_join_implied_equalities_normal(), generate_matching_part_pairs(), generate_mergejoin_paths(), generate_nonunion_paths(), generate_orderedappend_paths(), generate_partition_qual(), generate_partitionwise_join_paths(), generate_recursion_path(), generate_setop_tlist(), generate_subquery_params(), generate_subquery_vars(), generate_union_paths(), generate_useful_gather_paths(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), GenerateTypeDependencies(), get_actual_clauses(), get_actual_variable_range(), get_agg_expr(), get_all_vacuum_rels(), get_appendrel_parampathinfo(), get_available_versions_for_extension(), get_baserel_parampathinfo(), get_basic_select_query(), get_batch_size_option(), get_cheapest_parameterized_child_path(), get_collation(), get_database_list(), get_delete_query_def(), get_eclass_for_sort_expr(), get_ext_ver_info(), get_ext_ver_list(), get_file_fdw_attribute_options(), get_foreign_key_join_selectivity(), get_from_clause_item(), get_func_expr(), get_gating_quals(), get_index_clause_from_support(), get_index_paths(), get_index_ref_constraints(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_leftop(), get_matching_part_pairs(), get_memoize_path(), get_mergejoin_opfamilies(), get_name_for_var_field(), get_op_btree_interpretation(), get_opclass(), get_partition_ancestors(), get_partition_qual_relid(), get_policies_for_relation(), get_qual_for_list(), get_qual_for_range(), get_qual_from_partbound(), get_quals_from_indexclauses(), get_query_def(), get_range_nulltest(), get_rel_sync_entry(), get_relation_constraints(), get_relation_info(), get_relation_statistics(), get_rels_with_domain(), get_row_security_policies(), get_rule_expr(), get_select_query_def(), get_sortgrouplist_exprs(), get_steps_using_prefix(), get_steps_using_prefix_recurse(), get_subscription_list(), get_switched_clauses(), get_tablefunc(), get_tables_to_cluster(), get_tablesample_def(), get_tlist_exprs(), get_ts_parser_func(), get_ts_template_func(), get_update_query_def(), get_update_query_targetlist_def(), get_useful_ecs_for_relation(), get_useful_pathkeys_for_relation(), get_variable(), get_windowfunc_expr(), get_with_clause(), GetAllTablesPublicationRelations(), GetAllTablesPublications(), getAutoExtensionsOfObject(), GetCachedPlan(), GetForeignColumnOptions(), GetForeignDataWrapperExtended(), GetForeignServerExtended(), GetForeignTable(), getObjectIdentityParts(), getOwnedSequences_internal(), GetParentedForeignKeyRefs(), GetPublicationRelations(), getRelationIdentity(), GetRelationPublications(), getRelationsInNamespace(), getState(), GetSubscriptionNotReadyRelations(), GetSubscriptionRelations(), gettype(), GetUserMapping(), gimme_tree(), gincostestimate(), gistEmptyAllBuffers(), gistFindPath(), gistfixsplit(), gistGetNodeBuffer(), gistInitBuildBuffers(), gistplacetopage(), gistProcessEmptyingQueue(), GrantRole(), grouping_planner(), has_indexed_join_quals(), has_unique_index(), has_useful_pathkeys(), hash_inner_and_outer(), hashagg_reset_spill_state(), hashvalidate(), heap_truncate(), heap_truncate_check_FKs(), heap_truncate_find_FKs(), heapam_index_build_range_scan(), heapam_index_validate_scan(), hstore_subscript_transform(), identify_current_nestloop_params(), identify_opfamily_groups(), identify_update_path(), index_concurrently_create_copy(), index_concurrently_swap(), index_constraint_create(), index_register(), IndexCheckExclusion(), infer_arbiter_indexes(), init_execution_state(), init_local_reloptions(), init_params(), init_sql_fcache(), InitDomainConstraintRef(), initialize_mergeclause_eclasses(), InitPlan(), InitResultRelInfo(), InitSync(), inline_cte_walker(), innerrel_is_unique(), insert_event_trigger_tuple(), InsertRule(), interpret_AS_clause(), interpret_func_support(), interpret_function_parameter_list(), intorel_startup(), is_degenerate_grouping(), is_dummy_rel(), is_innerrel_unique_for(), is_parallel_safe(), is_safe_append_member(), is_shippable(), is_strict_saop(), is_usable_unique_index(), isLockedRefname(), IsThereFunctionInNamespace(), join_is_removable(), join_search_one_level(), jsonb_subscript_transform(), JsonValueListInitIterator(), label_sort_with_costsize(), lappend(), lappend_int(), lappend_oid(), lcons(), lcons_int(), lcons_oid(), list_concat(), list_concat_copy(), list_copy(), list_copy_deep(), list_copy_tail(), list_delete_first(), list_delete_last(), list_delete_nth_cell(), list_difference(), list_difference_int(), list_difference_oid(), list_difference_ptr(), list_free_private(), list_insert_nth(), list_insert_nth_int(), list_insert_nth_oid(), list_intersection(), list_intersection_int(), list_last_cell(), list_nth_cell(), list_truncate(), llvm_release_context(), load_domaintype_info(), load_hba(), load_ident(), load_relcache_init_file(), LoadPublications(), LockTableCommand(), logicalrep_read_truncate(), logicalrep_workers_find(), lookup_agg_function(), lookup_am_handler_func(), lookup_proof_cache(), lookup_ts_dictionary_cache(), LookupFuncName(), LookupFuncNameInternal(), LookupFuncWithArgs(), LookupTypeNameExtended(), make_ands_explicit(), make_ands_implicit(), make_bitmap_and(), make_bitmap_indexscan(), make_bitmap_or(), make_build_data(), make_copy_attnamelist(), make_group_input_target(), make_hash(), make_incrementalsort(), make_inh_translation_list(), make_inner_pathkeys_for_merge(), make_join_rel(), make_limit(), make_lockrows(), make_material(), make_memoize(), make_modifytable(), make_new_heap(), make_one_partition_rbound(), make_partial_grouping_target(), make_partition_op_expr(), make_partition_pruneinfo(), make_partitionedrel_pruneinfo(), make_pathkeys_for_sortclauses(), make_project_set(), make_recursive_union(), make_rel_from_joinlist(), make_restrictinfo_internal(), make_result(), make_row_comparison_op(), make_ruledef(), make_setop(), make_setop_translation_list(), make_sort(), make_sort_input_target(), make_sub_restrictinfos(), make_subplan(), make_tlist_from_pathtarget(), make_union_unique(), make_unique_from_pathkeys(), make_unique_from_sortclauses(), make_viewdef(), make_window_input_target(), make_windowagg(), makeColumnDef(), makeDependencyGraph(), makeDependencyGraphWalker(), makeFuncCall(), makeIndexInfo(), makeMultirangeConstructors(), makeRangeConstructors(), makeTypeNameFromNameList(), map_partition_varattnos(), map_sql_typecoll_to_xmlschema_types(), mark_dummy_rel(), match_boolean_index_clause(), match_clause_to_indexcol(), match_clause_to_partition_key(), match_eclasses_to_foreign_key_col(), match_foreign_keys_to_quals(), match_network_function(), match_network_subset(), match_opclause_to_indexcol(), match_pathkeys_to_index(), match_pattern_prefix(), match_saopclause_to_indexcol(), match_unsorted_outer(), matchLocks(), MatchNamedCall(), materialize_finished_plan(), max_parallel_hazard(), mcv_get_match_bitmap(), merge_clump(), merge_list_bounds(), merge_range_bounds(), MergeAttributes(), minmax_qp_callback(), negate_clause(), next_field_expand(), nodeRead(), NotNullImpliedByRelConstraints(), objectNamesToOids(), objectsInSchemaToOids(), oid_array_to_list(), OpenTableList(), order_qual_clauses(), paraminfo_get_equal_hashops(), parse_hba_line(), parse_ident_line(), parse_tsquery(), parseCheckAggregates(), ParseFuncOrColumn(), PartConstraintImpliedByRelConstraint(), partition_bounds_merge(), pathkeys_count_contained_in(), pathkeys_useful_for_merging(), pathkeys_useful_for_ordering(), perform_base_backup(), perform_pruning_combine_step(), PerformCursorOpen(), pg_column_is_updatable(), pg_extension_update_paths(), pg_get_constraintdef_worker(), pg_get_expr_worker(), pg_get_function_arg_default(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_object_address(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), pg_get_triggerdef_worker(), pg_identify_object_as_address(), pg_logical_replication_slot_advance(), pg_logical_slot_get_changes_guts(), pg_partition_root(), pg_partition_tree(), pg_plan_queries(), pg_relation_is_updatable(), pg_rewrite_query(), pgoutput_startup(), pgstat_db_requested(), pgstat_write_statsfile_needed(), pgstat_write_statsfiles(), plan_cluster_use_sort(), plan_set_operations(), plan_union_children(), PlanCacheRelCallback(), plperl_inline_handler(), plpgsql_parse_word(), PLy_abort_open_subtransactions(), PLy_initialize(), PLy_procedure_create(), PLy_subtransaction_exit(), policy_role_list_to_array(), PopOverrideSearchPath(), populate_joinrel_with_paths(), populate_typ_list(), PortalDefineQuery(), PortalReleaseCachedPlan(), PortalRunMulti(), postgresBeginForeignInsert(), postgresGetForeignJoinPaths(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresGetForeignRelSize(), postgresImportForeignSchema(), postgresPlanDirectModify(), postgresPlanForeignModify(), PostmasterMain(), PreCommit_on_commit_actions(), predicate_implied_by(), predicate_refuted_by(), prep_domain_constraints(), preprocess_aggref(), preprocess_function_rtes(), preprocess_groupclause(), preprocess_grouping_sets(), preprocess_minmax_aggregates(), preprocess_rowmarks(), print_function_arguments(), ProcedureCreate(), process_duplicate_ors(), process_equivalence(), process_sublinks_mutator(), ProcessCopyOptions(), ProcessIncomingNotify(), ProcessStartupPacket(), processState(), processTypesSpec(), ProcessUtilitySlow(), prune_append_rel_partitions(), publication_add_relation(), pull_ands(), pull_ors(), pull_up_constant_function(), pull_up_simple_subquery(), pull_up_simple_values(), pull_up_sublinks_jointree_recurse(), pull_up_sublinks_qual_recurse(), pull_var_clause(), pull_vars_of_level(), PushOverrideSearchPath(), query_planner(), query_supports_distinctness(), query_to_oid_list(), query_tree_mutator(), QueryRewrite(), range_table_mutator(), raw_parser(), readTimeLineHistory(), recomputeNamespacePath(), recurse_set_operations(), reduce_outer_joins(), reduce_outer_joins_pass1(), reduce_outer_joins_pass2(), regprocedurein(), regprocin(), regprocout(), reindex_relation(), ReindexMultipleTables(), ReindexPartitions(), ReindexRelationConcurrently(), rel_is_distinct_for(), rel_supports_distinctness(), rel_sync_cache_relation_cb(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationBuildDesc(), RelationCacheInvalidate(), RelationGetDummyIndexExpressions(), RelationGetFKeyList(), RelationGetIndexAttrBitmap(), RelationGetIndexExpressions(), RelationGetIndexList(), RelationGetIndexPredicate(), RelationGetPartitionQual(), RelationGetStatExtList(), RelationInitIndexAccessInfo(), remap_to_groupclause_idx(), remove_dbtablespaces(), remove_rel_from_joinlist(), remove_useless_groupby_columns(), RemoveInheritance(), RemovePublicationRelById(), RemoveRoleFromObjectACL(), RemoveSocketFiles(), rename_constraint_internal(), renameatt_internal(), reorder_function_arguments(), reorder_grouping_sets(), reparameterize_path(), reparameterize_pathlist_by_child(), replace_empty_jointree(), ResetReindexState(), resolve_unique_index_expr(), ResolveOpClass(), RestoreReindexState(), RevalidateCachedQuery(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), rewriteTargetView(), rewriteValuesRTE(), roleSpecsToIds(), schema_to_xmlschema_internal(), SearchCatCacheList(), select_active_windows(), select_common_type(), select_mergejoin_clauses(), select_outer_pathkeys_for_merge(), select_rtable_names_for_explain(), sendTablespace(), sepgsql_xact_callback(), sequence_options(), set_append_references(), set_append_rel_pathlist(), set_cheapest(), set_customscan_references(), set_deparse_for_query(), set_deparse_plan(), set_dummy_rel_pathlist(), set_dummy_tlist_references(), set_foreignscan_references(), set_function_pathlist(), set_hash_references(), set_joinrel_partition_key_exprs(), set_mergeappend_references(), set_plan_references(), set_plan_refs(), set_relation_column_names(), set_rtable_names(), set_simple_column_names(), set_subquery_pathlist(), set_upper_references(), SetDefaultACLsInSchemas(), setup_simple_rel_arrays(), show_eval_params(), show_grouping_set_keys(), show_incremental_sort_group_info(), show_modifytable_info(), show_plan_tlist(), show_qual(), show_sort_group_keys(), show_tablesample(), simplify_and_arguments(), simplify_EXISTS_query(), simplify_or_arguments(), sort_inner_and_outer(), SPI_cursor_open_internal(), split_pathtarget_at_srfs(), split_pathtarget_walker(), SplitDirectoriesString(), SplitGUCList(), SplitIdentifierString(), SS_charge_for_initplans(), SS_identify_outer_params(), SS_process_ctes(), standard_ExecutorStart(), standard_join_search(), standard_planner(), standard_qp_callback(), StandbyAcquireAccessExclusiveLock(), StartupXLOG(), statext_is_compatible_clause(), statext_is_compatible_clause_internal(), statext_mcv_clauselist_selectivity(), StoreCatalogInheritance(), StoreConstraints(), stringToQualifiedNameList(), subquery_planner(), SyncPostCheckpoint(), TerminateOtherDBBackends(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), textarray_to_stringlist(), textarray_to_strvaluelist(), textToQualifiedNameList(), TidExprListCreate(), TidQualFromRestrictInfo(), TidQualFromRestrictInfoList(), TidRangeQualFromRestrictInfoList(), to_regproc(), to_regprocedure(), toast_open_indexes(), tokenize_file(), transformAExprIn(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformBoolExpr(), transformCallStmt(), transformCaseExpr(), transformCheckConstraints(), transformCoalesceExpr(), transformColumnDefinition(), transformCreateSchemaStmt(), transformCreateStmt(), transformDeclareCursorStmt(), transformDeleteStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExpressionList(), transformFKConstraints(), transformFkeyGetPrimaryKey(), transformFromClauseItem(), transformFuncCall(), transformGraph(), transformGroupClause(), transformGroupClauseList(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexConstraints(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformLockingClause(), transformMinMaxExpr(), transformMultiAssignRef(), transformOfType(), transformOnConflictArbiter(), transformOnConflictClause(), transformPartitionBound(), transformPartitionRangeBounds(), transformPartitionSpec(), transformPLAssignStmt(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRelOptions(), transformReturningList(), transformRowExpr(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSortClause(), transformSubLink(), transformTableLikeClause(), transformTargetList(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), translate_sub_tlist(), trim_mergeclauses_for_inner_pathkeys(), trivial_subqueryscan(), truncate_useless_pathkeys(), try_hashjoin_path(), try_mergejoin_path(), try_partial_hashjoin_path(), try_partial_mergejoin_path(), try_partitionwise_join(), TryReuseForeignKey(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), ts_headline_jsonb_byid_opt(), TypeGetTupleDesc(), typeInheritsFrom(), typenameTypeMod(), unique_key_recheck(), UnlinkLockFiles(), untransformRelOptions(), update_mergeclause_eclasses(), UpdateDomainConstraintRef(), UpdateIndexRelation(), UpdateLogicalMappings(), UpdateRangeTableOfViewParse(), use_physical_tlist(), vacuum(), ValuesNext(), verify_heapam(), view_query_is_auto_updatable(), WaitForLockersMultiple(), XactHasExportedSnapshots(), and xmlelement().

Typedef Documentation

◆ ForBothCellState

◆ ForBothState

typedef struct ForBothState ForBothState

◆ ForEachState

typedef struct ForEachState ForEachState

◆ ForFiveState

typedef struct ForFiveState ForFiveState

◆ ForFourState

typedef struct ForFourState ForFourState

◆ ForThreeState

typedef struct ForThreeState ForThreeState

◆ List

typedef struct List List

◆ list_sort_comparator

typedef int(* list_sort_comparator) (const ListCell *a, const ListCell *b)

Definition at line 604 of file pg_list.h.

◆ ListCell

typedef union ListCell ListCell

Function Documentation

◆ for_both_cell_setup()

static ForBothCellState for_both_cell_setup ( const List list1,
const ListCell initcell1,
const List list2,
const ListCell initcell2 
)
inlinestatic

Definition at line 477 of file pg_list.h.

References list_cell_number(), and list_length().

479 {
480  ForBothCellState r = {list1, list2,
481  initcell1 ? list_cell_number(list1, initcell1) : list_length(list1),
482  initcell2 ? list_cell_number(list2, initcell2) : list_length(list2)};
483 
484  return r;
485 }
static int list_cell_number(const List *l, const ListCell *c)
Definition: pg_list.h:312
static int list_length(const List *l)
Definition: pg_list.h:149

◆ for_each_cell_setup()

static ForEachState for_each_cell_setup ( const List lst,
const ListCell initcell 
)
inlinestatic

Definition at line 426 of file pg_list.h.

References list_cell_number(), and list_length().

427 {
428  ForEachState r = {lst,
429  initcell ? list_cell_number(lst, initcell) : list_length(lst)};
430 
431  return r;
432 }
static int list_cell_number(const List *l, const ListCell *c)
Definition: pg_list.h:312
static int list_length(const List *l)
Definition: pg_list.h:149

◆ for_each_from_setup()

static ForEachState for_each_from_setup ( const List lst,
int  N 
)
inlinestatic

Definition at line 402 of file pg_list.h.

References Assert.

403 {
404  ForEachState r = {lst, N};
405 
406  Assert(N >= 0);
407  return r;
408 }
#define Assert(condition)
Definition: c.h:804

◆ lappend()

pg_nodiscard List* lappend ( List list,
void *  datum 
)

Definition at line 336 of file list.c.

References Assert, check_list_invariants, IsPointerList, sort-test::list, llast, new_list(), new_tail_cell(), NIL, and T_List.

Referenced by _SPI_make_plan_non_temp(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), _SPI_save_plan(), accumulate_append_subpath(), AcquireRewriteLocks(), add_column_to_pathtarget(), add_dummy_return(), add_eq_member(), add_join_clause_to_rels(), add_join_rel(), add_local_reloption(), add_merged_range_bounds(), add_part_relids(), add_paths_to_append_rel(), add_placeholders_to_base_rels(), add_placeholders_to_joinrel(), add_row_identity_var(), add_rte_to_flat_rtable(), add_security_quals(), add_to_flat_tlist(), add_unique_group_var(), add_vars_to_targetlist(), add_with_check_options(), addArc(), AddEventToPendingNotifies(), addFamilyMember(), addFkRecurseReferencing(), addKey(), addKeyToQueue(), addNSItemToQuery(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addTargetToGroupList(), addTargetToSortList(), AlterPublicationTables(), AlterTableMoveAll(), AlterTSDictionary(), analyzeCTE(), analyzeCTETargetList(), apply_child_basequals(), apply_handle_truncate(), apply_scanjoin_target_to_paths(), applyLockingClause(), ApplyRetrieveRule(), array_subscript_transform(), assign_param_for_placeholdervar(), assign_param_for_var(), ATAddCheckConstraint(), ATExecAddColumn(), ATExecValidateConstraint(), ATGetQueueEntry(), ATParseTransformCmd(), ATPostAlterTypeCleanup(), ATPostAlterTypeParse(), ATPrepAlterColumnType(), ATPrepCmd(), btcostestimate(), build_aggregate_finalfn_expr(), build_aggregate_transfn_expr(), build_coercion_expression(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_rel(), build_joinrel_tlist(), build_partition_pathkeys(), build_path_tlist(), build_physical_tlist(), build_remote_returning(), build_subplan(), BuildEventTriggerCache(), BuildOnConflictExcludedTargetlist(), buildRelationAliases(), cached_scansel(), calc_joinrel_size_estimate(), can_minmax_aggs(), check_index_predicates(), check_selective_binary_conversion(), check_sql_fn_retval(), check_tuple_attribute(), checkInsertTargets(), checkSharedDependencies(), checkWellFormedRecursionWalker(), choose_bitmap_and(), ChooseIndexColumnNames(), classifyConditions(), clauselist_apply_dependencies(), CloneFkReferenced(), CloneFkReferencing(), CloneRowTriggersToPartition(), coerce_fn_result_column(), coerce_record_to_complex(), compute_common_attribute(), compute_semi_anti_join_factors(), compute_semijoin_info(), ComputeIndexAttrs(), ComputePartitionAttrs(), consider_groupingsets_paths(), consider_new_or_clause(), convert_ANY_sublink_to_join(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), CopyMultiInsertInfoFlush(), CopyMultiInsertInfoSetupBuffer(), cost_incremental_sort(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_ctas_nodata(), create_customscan_plan(), create_degenerate_grouping_paths(), create_edata_for_relation(), create_groupingsets_plan(), create_hashjoin_plan(), create_index_paths(), create_indexscan_plan(), create_join_clause(), create_merge_append_plan(), create_nestloop_path(), create_partitionwise_grouping_paths(), create_tidrangescan_plan(), create_tidscan_plan(), create_unique_plan(), CreateStatistics(), database_to_xmlschema_internal(), deconstruct_recurse(), DefineRelation(), DefineSequence(), DefineTSDictionary(), DefineView(), DefineVirtualRelation(), deparseParam(), deparseVar(), deserialize_deflist(), determineRecursiveColTypes(), distribute_qual_to_rels(), distribute_restrictinfo_to_rels(), distribute_row_identity_vars(), do_pg_start_backup(), DoCopy(), estimate_multivariate_ndistinct(), estimate_num_groups(), eval_const_expressions_mutator(), EvalPlanQualStart(), EventTriggerAlterTableEnd(), EventTriggerCollectAlterDefPrivs(), EventTriggerCollectAlterOpFam(), EventTriggerCollectAlterTableSubcmd(), EventTriggerCollectAlterTSConfig(), EventTriggerCollectCreateOpClass(), EventTriggerCollectGrant(), EventTriggerCollectSimpleCommand(), Exec_ListenCommit(), ExecAllocTableSlot(), ExecEvalXmlExpr(), ExecGetTriggerResultRel(), ExecInitExprList(), ExecInitExprRec(), ExecInitInsertProjection(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitNode(), ExecInitPartitionInfo(), ExecInitResultRelation(), ExecInitSubPlan(), ExecPrepareExprList(), ExecSerializePlan(), ExecuteGrantStmt(), ExecuteTruncate(), ExecuteTruncateGuts(), expand_grouping_sets(), expand_groupingset_node(), expand_inherited_rtentry(), expand_insert_targetlist(), expand_single_inheritance_child(), expand_vacuum_rel(), expandNSItemAttrs(), expandNSItemVars(), ExpandRowReference(), expandRTE(), expandTableLikeClause(), expandTupleDesc(), ExplainNode(), ExportSnapshot(), expression_tree_mutator(), extract_actual_clauses(), extract_actual_join_clauses(), extract_jsp_path_expr_nodes(), extract_lateral_references(), extract_nonindex_conditions(), extract_or_clause(), extract_rollup_sets(), extractRemainingColumns(), fetch_statentries_for_relation(), fetch_table_list(), fetch_upper_rel(), FetchTableStates(), file_fdw_validator(), fill_hba_line(), find_duplicate_ors(), find_hash_columns(), find_indexpath_quals(), find_list_position(), find_mergeclauses_for_outer_pathkeys(), find_partition_scheme(), find_placeholder_info(), find_window_functions_walker(), findTargetlistEntrySQL99(), fireRIRrules(), fireRules(), fix_indexorderby_references(), fix_indexqual_references(), flatten_grouping_sets(), flatten_join_alias_vars_mutator(), flatten_simple_union_all(), fmgr_sql_validator(), foreign_grouping_ok(), foreign_join_ok(), format_operator_parts(), format_procedure_parts(), func_get_detail(), gen_partprune_steps_internal(), gen_prune_step_combine(), gen_prune_step_op(), gen_prune_steps_from_opexps(), generate_append_tlist(), generate_base_implied_equalities_const(), generate_bitmap_or_paths(), generate_implied_equalities_for_column(), generate_join_implied_equalities_broken(), generate_join_implied_equalities_normal(), generate_matching_part_pairs(), generate_orderedappend_paths(), generate_partitionwise_join_paths(), generate_setop_tlist(), generate_subquery_params(), generate_subquery_vars(), generate_union_paths(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), generateSerialExtraStmts(), get_actual_clauses(), get_all_vacuum_rels(), get_appendrel_parampathinfo(), get_baserel_parampathinfo(), get_database_list(), get_eclass_for_sort_expr(), get_ext_ver_info(), get_ext_ver_list(), get_file_fdw_attribute_options(), get_foreign_key_join_selectivity(), get_func_expr(), get_index_clause_from_support(), get_index_paths(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_matching_part_pairs(), get_op_btree_interpretation(), get_policies_for_relation(), get_qual_for_hash(), get_qual_for_list(), get_qual_for_range(), get_quals_from_indexclauses(), get_range_nulltest(), get_relation_constraints(), get_relation_foreign_keys(), get_relation_statistics(), get_rels_with_domain(), get_required_extension(), get_sortgrouplist_exprs(), get_steps_using_prefix_recurse(), get_subscription_list(), get_switched_clauses(), get_tables_to_cluster(), get_tlist_exprs(), get_update_query_targetlist_def(), get_useful_ecs_for_relation(), get_useful_pathkeys_for_relation(), get_windowfunc_expr(), GetAfterTriggersTableData(), getObjectIdentityParts(), getState(), GetSubscriptionNotReadyRelations(), GetSubscriptionRelations(), gistFindPath(), gistfixsplit(), gistplacetopage(), grouping_planner(), hash_inner_and_outer(), heap_truncate(), identify_current_nestloop_params(), identify_opfamily_groups(), index_concurrently_create_copy(), infer_arbiter_indexes(), init_execution_state(), init_sql_fcache(), InitPlan(), innerrel_is_unique(), interpret_AS_clause(), interpret_function_parameter_list(), intorel_startup(), is_innerrel_unique_for(), join_is_removable(), jsonb_ops__extract_nodes(), jsonb_path_ops__extract_nodes(), jsonb_subscript_transform(), JsonValueListAppend(), list_append_unique(), list_append_unique_ptr(), list_concat_unique(), list_concat_unique_ptr(), list_difference(), list_difference_ptr(), list_intersection(), list_union(), list_union_ptr(), llvm_compile_module(), load_hba(), load_ident(), LoadPublications(), logicalrep_workers_find(), make_canonical_pathkey(), make_copy_attnamelist(), make_group_input_target(), make_inh_translation_list(), make_inner_pathkeys_for_merge(), make_modifytable(), make_partial_grouping_target(), make_partition_op_expr(), make_partition_pruneinfo(), make_partitionedrel_pruneinfo(), make_path_rowexpr(), make_pathkeys_for_sortclauses(), make_pathtarget_from_tlist(), make_rel_from_joinlist(), make_row_comparison_op(), make_setop_translation_list(), make_sort_input_target(), make_sub_restrictinfos(), make_tlist_from_pathtarget(), make_window_input_target(), makeDependencyGraphWalker(), match_clause_to_index(), match_clause_to_partition_key(), match_foreign_keys_to_quals(), match_join_clauses_to_index(), match_network_subset(), match_pathkeys_to_index(), match_pattern_prefix(), matchLocks(), merge_clump(), merge_list_bounds(), merge_publications(), MergeAttributes(), negate_clause(), next_field_expand(), nodeRead(), OpenTableList(), order_qual_clauses(), paraminfo_get_equal_hashops(), parse_hba_line(), parseCheckAggregates(), ParseFuncOrColumn(), PartConstraintImpliedByRelConstraint(), perform_base_backup(), pg_get_object_address(), pg_logical_slot_get_changes_guts(), pg_plan_queries(), pg_rewrite_query(), plan_union_children(), populate_typ_list(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresImportForeignSchema(), prep_domain_constraints(), prepare_sort_from_pathkeys(), preprocess_aggref(), preprocess_groupclause(), preprocess_grouping_sets(), preprocess_rowmarks(), preprocess_targetlist(), process_duplicate_ors(), process_equivalence(), process_pipe_input(), process_sublinks_mutator(), process_subquery_nestloop_params(), ProcessStartupPacket(), pull_ands(), pull_ors(), pull_up_simple_values(), pull_up_sublinks_jointree_recurse(), pull_up_sublinks_qual_recurse(), pull_up_union_leaf_queries(), pull_var_clause_walker(), pull_vars_walker(), query_tree_mutator(), QueryRewrite(), queue_listen(), range_table_mutator(), read_tablespace_map(), rebuild_fdw_scan_tlist(), RebuildConstraintComment(), record_plan_function_dependency(), record_plan_type_dependency(), reduce_outer_joins_pass1(), register_ENR(), register_label_provider(), register_reloptions_validator(), ReindexRelationConcurrently(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationCacheInvalidate(), RelationGetDummyIndexExpressions(), RelationGetFKeyList(), remap_to_groupclause_idx(), RememberConstraintForRebuilding(), RememberIndexForRebuilding(), RememberStatisticsForRebuilding(), RememberSyncRequest(), remove_rel_from_joinlist(), remove_useless_groupby_columns(), RemoveInheritance(), reorder_function_arguments(), reparameterize_path(), reparameterize_path_by_child(), reparameterize_pathlist_by_child(), replace_empty_jointree(), replace_nestloop_param_placeholdervar(), replace_nestloop_param_var(), replace_outer_agg(), replace_outer_grouping(), resolve_unique_index_expr(), RewriteQuery(), rewriteSearchAndCycle(), rewriteTargetListIU(), rewriteTargetView(), rewriteValuesRTE(), schema_to_xmlschema_internal(), SearchCatCacheList(), select_active_windows(), select_mergejoin_clauses(), select_outer_pathkeys_for_merge(), sepgsql_set_client_label(), sequence_options(), set_append_rel_pathlist(), set_cheapest(), set_deparse_for_query(), set_dummy_tlist_references(), set_joinrel_partition_key_exprs(), set_plan_references(), set_plan_refs(), set_rtable_names(), set_simple_column_names(), set_subquery_pathlist(), set_upper_references(), set_using_names(), show_eval_params(), show_grouping_set_keys(), show_incremental_sort_group_info(), show_modifytable_info(), show_plan_tlist(), show_sort_group_keys(), show_tablesample(), simplify_and_arguments(), simplify_or_arguments(), split_pathtarget_at_srfs(), split_pathtarget_walker(), SplitDirectoriesString(), SplitGUCList(), SplitIdentifierString(), SS_make_initplan_from_plan(), SS_process_ctes(), StandbyAcquireAccessExclusiveLock(), statext_is_compatible_clause_internal(), statext_mcv_clauselist_selectivity(), StreamServerPort(), stringToQualifiedNameList(), subquery_planner(), table_slot_create(), textarray_to_stringlist(), textarray_to_strvaluelist(), textToQualifiedNameList(), TidExprListCreate(), TidRangeQualFromRestrictInfoList(), tokenize_file(), tokenize_inc_file(), transformAExprIn(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformAssignmentIndirection(), transformBoolExpr(), transformCallStmt(), transformCaseExpr(), transformCoalesceExpr(), transformColumnDefinition(), transformCreateSchemaStmt(), transformCreateStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExpressionList(), transformFKConstraints(), transformFkeyGetPrimaryKey(), transformFromClause(), transformFromClauseItem(), transformFuncCall(), transformGenericOptions(), transformGroupClause(), transformGroupClauseExpr(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexConstraints(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformMinMaxExpr(), transformMultiAssignRef(), transformOfType(), transformPartitionBound(), transformPartitionRangeBounds(), transformPartitionSpec(), transformPLAssignStmt(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRowExpr(), transformRuleStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), trim_mergeclauses_for_inner_pathkeys(), untransformRelOptions(), UpdateLogicalMappings(), WaitForLockersMultiple(), and xmlelement().

337 {
338  Assert(IsPointerList(list));
339 
340  if (list == NIL)
341  list = new_list(T_List, 1);
342  else
343  new_tail_cell(list);
344 
345  llast(list) = datum;
346  check_list_invariants(list);
347  return list;
348 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
#define llast(l)
Definition: pg_list.h:194
static void new_tail_cell(List *list)
Definition: list.c:320
#define IsPointerList(l)
Definition: list.c:54
Definition: nodes.h:301
#define Assert(condition)
Definition: c.h:804
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ lappend_int()

pg_nodiscard List* lappend_int ( List list,
int  datum 
)

Definition at line 354 of file list.c.

References Assert, check_list_invariants, IsIntegerList, sort-test::list, llast_int, new_list(), new_tail_cell(), NIL, and T_IntList.

Referenced by add_merged_range_bounds(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), adjust_inherited_attnums(), adjust_partition_colnos(), analyzeCTETargetList(), ATRewriteTable(), build_merged_partition_bounds(), build_subplan(), check_ungrouped_columns_walker(), checkInsertTargets(), convert_EXISTS_to_ANY(), CopyGetAttnums(), deparseAnalyzeSql(), deparseExplicitTargetList(), deparseTargetList(), ExecBuildAggTrans(), ExecBuildGroupingEqual(), ExecBuildParamSetEqual(), ExecInitExprRec(), ExecInitQual(), ExecInitSubscriptingRef(), expand_indexqual_rowcompare(), extract_update_targetlist_colnos(), extractRemainingColumns(), fetch_statentries_for_relation(), finalize_grouping_exprs_walker(), find_all_inheritors(), find_compatible_agg(), fix_expr_common(), gen_partprune_steps_internal(), generate_subquery_params(), grouping_planner(), list_append_unique_int(), list_concat_unique_int(), list_difference_int(), list_intersection_int(), list_union_int(), match_pathkeys_to_index(), merge_list_bounds(), nodeRead(), postgresBeginForeignInsert(), postgresPlanForeignModify(), rel_is_distinct_for(), remap_to_groupclause_idx(), reorder_grouping_sets(), rewriteSearchAndCycle(), set_plan_refs(), set_schema_sent_in_streamed_txn(), split_pathtarget_at_srfs(), SS_process_ctes(), TerminateOtherDBBackends(), transformDistinctOnClause(), transformFromClauseItem(), transformGroupClauseList(), transformInsertStmt(), transformRangeTableFunc(), transformSetOperationTree(), transformValuesClause(), and translate_sub_tlist().

355 {
356  Assert(IsIntegerList(list));
357 
358  if (list == NIL)
359  list = new_list(T_IntList, 1);
360  else
361  new_tail_cell(list);
362 
363  llast_int(list) = datum;
364  check_list_invariants(list);
365  return list;
366 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
#define IsIntegerList(l)
Definition: list.c:55
static void new_tail_cell(List *list)
Definition: list.c:320
#define Assert(condition)
Definition: c.h:804
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88
#define llast_int(l)
Definition: pg_list.h:195

◆ lappend_oid()

pg_nodiscard List* lappend_oid ( List list,
Oid  datum 
)

Definition at line 372 of file list.c.

References Assert, check_list_invariants, IsOidList, sort-test::list, llast_oid, new_list(), new_tail_cell(), NIL, and T_OidList.

Referenced by add_rte_to_flat_rtable(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), AfterTriggerSetState(), AlterTableMoveAll(), analyzeCTETargetList(), apply_handle_truncate(), ApplyExtensionUpdates(), assign_collations_walker(), assign_param_for_placeholdervar(), assign_param_for_var(), assign_special_exec_param(), binary_upgrade_create_empty_extension(), check_functional_grouping(), CheckAttributeType(), CloneFkReferenced(), CloneFkReferencing(), compute_semijoin_info(), convert_EXISTS_to_ANY(), create_hashjoin_plan(), create_indexscan_plan(), CreateExtensionInternal(), CreateFunction(), CreateTriggerFiringOn(), DefineRelation(), do_autovacuum(), EventTriggerCommonSetup(), ExecAlterDefaultPrivilegesStmt(), ExecInitPartitionInfo(), ExecInsertIndexTuples(), ExecuteGrantStmt(), ExecuteTruncate(), ExecuteTruncateGuts(), expand_indexqual_rowcompare(), extract_query_dependencies_walker(), ExtractExtensionList(), find_all_inheritors(), find_inheritance_children_extended(), find_typed_table_dependencies(), fireRIRrules(), fix_expr_common(), generate_new_exec_param(), get_index_ref_constraints(), get_mergejoin_opfamilies(), get_partition_ancestors_worker(), get_steps_using_prefix_recurse(), GetAllTablesPublicationRelations(), GetAllTablesPublications(), getAutoExtensionsOfObject(), getOwnedSequences_internal(), GetParentedForeignKeyRefs(), GetPubPartitionOptionRelations(), GetRelationPublications(), getRelationsInNamespace(), heap_truncate_check_FKs(), heap_truncate_find_FKs(), index_concurrently_swap(), infer_arbiter_indexes(), inline_function(), interpret_function_parameter_list(), list_append_unique_oid(), list_concat_unique_oid(), list_difference_oid(), list_union_oid(), LockViewRecurse(), logicalrep_read_truncate(), make_row_comparison_op(), nodeRead(), objectNamesToOids(), objectsInSchemaToOids(), oid_array_to_list(), OpenTableList(), paraminfo_get_equal_hashops(), pgstat_recv_inquiry(), PreCommit_on_commit_actions(), query_to_oid_list(), recomputeNamespacePath(), ReindexMultipleTables(), ReindexPartitions(), ReindexRelationConcurrently(), rel_is_distinct_for(), relation_is_updatable(), RelationGetIndexList(), RelationGetStatExtList(), RememberConstraintForRebuilding(), RememberIndexForRebuilding(), RememberStatisticsForRebuilding(), remove_dbtablespaces(), replace_outer_agg(), replace_outer_grouping(), RestoreReindexState(), rewriteSearchAndCycle(), roleSpecsToIds(), transformAggregateCall(), transformInsertStmt(), transformRangeTableFunc(), transformSetOperationTree(), transformValuesClause(), TryReuseForeignKey(), and typeInheritsFrom().

373 {
374  Assert(IsOidList(list));
375 
376  if (list == NIL)
377  list = new_list(T_OidList, 1);
378  else
379  new_tail_cell(list);
380 
381  llast_oid(list) = datum;
382  check_list_invariants(list);
383  return list;
384 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
#define llast_oid(l)
Definition: pg_list.h:196
static void new_tail_cell(List *list)
Definition: list.c:320
#define IsOidList(l)
Definition: list.c:56
#define Assert(condition)
Definition: c.h:804
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ lcons()

pg_nodiscard List* lcons ( void *  datum,
List list 
)

Definition at line 468 of file list.c.

References Assert, check_list_invariants, IsPointerList, linitial, sort-test::list, new_head_cell(), new_list(), NIL, and T_List.

Referenced by build_minmax_path(), checkWellFormedRecursionWalker(), consider_groupingsets_paths(), CreateExprContextInternal(), CreateLockFile(), ExecInitModifyTable(), expandTableLikeClause(), ExplainNode(), ExplainSubPlans(), extract_rollup_sets(), find_expr_references_walker(), find_update_path(), generate_orderedappend_paths(), generateSerialExtraStmts(), get_name_for_var_field(), get_object_address_rv(), get_query_def(), get_relation_info(), gistEmptyAllBuffers(), gistFindPath(), gistGetNodeBuffer(), gistPushItupToNodeBuffer(), hashagg_spill_finish(), load_domaintype_info(), makeDependencyGraphWalker(), pg_get_object_address(), plan_union_children(), PLy_subtransaction_enter(), PrepareClientEncoding(), push_child_plan(), pushOperator(), PushOverrideSearchPath(), pushStop(), pushValue_internal(), readTimeLineHistory(), register_on_commit_action(), RelationBuildRowSecurity(), RelationCacheInvalidate(), reorder_grouping_sets(), RewriteQuery(), rewriteSearchAndCycle(), rewriteTargetView(), sepgsql_avc_compute(), set_cheapest(), show_agg_keys(), show_group_keys(), sort_inner_and_outer(), transformCaseExpr(), and UpdateRangeTableOfViewParse().

469 {
470  Assert(IsPointerList(list));
471 
472  if (list == NIL)
473  list = new_list(T_List, 1);
474  else
475  new_head_cell(list);
476 
477  linitial(list) = datum;
478  check_list_invariants(list);
479  return list;
480 }
#define NIL
Definition: pg_list.h:65
static void new_head_cell(List *list)
Definition: list.c:302
#define check_list_invariants(l)
Definition: list.c:77
#define linitial(l)
Definition: pg_list.h:174
#define IsPointerList(l)
Definition: list.c:54
Definition: nodes.h:301
#define Assert(condition)
Definition: c.h:804
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ lcons_int()

pg_nodiscard List* lcons_int ( int  datum,
List list 
)

Definition at line 486 of file list.c.

References Assert, check_list_invariants, IsIntegerList, linitial_int, sort-test::list, new_head_cell(), new_list(), NIL, and T_IntList.

Referenced by ExecInitAgg(), ExplainBeginOutput(), ExplainOpenGroup(), ExplainOpenSetAsideGroup(), and ExplainRestoreGroup().

487 {
488  Assert(IsIntegerList(list));
489 
490  if (list == NIL)
491  list = new_list(T_IntList, 1);
492  else
493  new_head_cell(list);
494 
495  linitial_int(list) = datum;
496  check_list_invariants(list);
497  return list;
498 }
#define NIL
Definition: pg_list.h:65
static void new_head_cell(List *list)
Definition: list.c:302
#define check_list_invariants(l)
Definition: list.c:77
#define IsIntegerList(l)
Definition: list.c:55
#define linitial_int(l)
Definition: pg_list.h:175
#define Assert(condition)
Definition: c.h:804
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ lcons_oid()

pg_nodiscard List* lcons_oid ( Oid  datum,
List list 
)

Definition at line 504 of file list.c.

References Assert, check_list_invariants, IsOidList, linitial_oid, sort-test::list, new_head_cell(), new_list(), NIL, and T_OidList.

Referenced by CreateSchemaCommand(), pg_partition_ancestors(), PushOverrideSearchPath(), recomputeNamespacePath(), and ReindexMultipleTables().

505 {
506  Assert(IsOidList(list));
507 
508  if (list == NIL)
509  list = new_list(T_OidList, 1);
510  else
511  new_head_cell(list);
512 
513  linitial_oid(list) = datum;
514  check_list_invariants(list);
515  return list;
516 }
#define NIL
Definition: pg_list.h:65
static void new_head_cell(List *list)
Definition: list.c:302
#define check_list_invariants(l)
Definition: list.c:77
#define IsOidList(l)
Definition: list.c:56
#define Assert(condition)
Definition: c.h:804
#define linitial_oid(l)
Definition: pg_list.h:176
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_append_unique()

pg_nodiscard List* list_append_unique ( List list,
void *  datum 
)

Definition at line 1195 of file list.c.

References lappend(), sort-test::list, and list_member().

Referenced by add_security_quals(), and add_with_check_options().

1196 {
1197  if (list_member(list, datum))
1198  return list;
1199  else
1200  return lappend(list, datum);
1201 }
bool list_member(const List *list, const void *datum)
Definition: list.c:628
List * lappend(List *list, void *datum)
Definition: list.c:336

◆ list_append_unique_int()

pg_nodiscard List* list_append_unique_int ( List list,
int  datum 
)

Definition at line 1220 of file list.c.

References lappend_int(), sort-test::list, and list_member_int().

1221 {
1222  if (list_member_int(list, datum))
1223  return list;
1224  else
1225  return lappend_int(list, datum);
1226 }
bool list_member_int(const List *list, int datum)
Definition: list.c:669
List * lappend_int(List *list, int datum)
Definition: list.c:354

◆ list_append_unique_oid()

pg_nodiscard List* list_append_unique_oid ( List list,
Oid  datum 
)

Definition at line 1232 of file list.c.

References lappend_oid(), sort-test::list, and list_member_oid().

Referenced by ATExecAlterConstrRecurse(), btvalidate(), hashvalidate(), heap_truncate_find_FKs(), map_sql_typecoll_to_xmlschema_types(), and roles_is_member_of().

1233 {
1234  if (list_member_oid(list, datum))
1235  return list;
1236  else
1237  return lappend_oid(list, datum);
1238 }
List * lappend_oid(List *list, Oid datum)
Definition: list.c:372
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:689

◆ list_append_unique_ptr()

pg_nodiscard List* list_append_unique_ptr ( List list,
void *  datum 
)

Definition at line 1208 of file list.c.

References lappend(), sort-test::list, and list_member_ptr().

Referenced by get_useful_ecs_for_relation(), postgresGetForeignPaths(), subbuild_joinrel_joinlist(), and subbuild_joinrel_restrictlist().

1209 {
1210  if (list_member_ptr(list, datum))
1211  return list;
1212  else
1213  return lappend(list, datum);
1214 }
List * lappend(List *list, void *datum)
Definition: list.c:336
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:649

◆ list_cell_number()

static int list_cell_number ( const List l,
const ListCell c 
)
inlinestatic

Definition at line 312 of file pg_list.h.

References Assert, List::elements, and List::length.

Referenced by for_both_cell_setup(), for_each_cell_setup(), and push_ancestor_plan().

313 {
314  Assert(c >= &l->elements[0] && c < &l->elements[l->length]);
315  return c - l->elements;
316 }
char * c
ListCell * elements
Definition: pg_list.h:55
#define Assert(condition)
Definition: c.h:804
int length
Definition: pg_list.h:53

◆ list_concat()

pg_nodiscard List* list_concat ( List list1,
const List list2 
)

Definition at line 530 of file list.c.

References Assert, check_list_invariants, List::elements, enlarge_list(), List::length, list_copy(), List::max_length, NIL, and List::type.

Referenced by accumulate_append_subpath(), add_predicate_to_index_quals(), addRangeTableEntryForJoin(), addRangeTableEntryForTableFunc(), ATExecAttachPartition(), ATParseTransformCmd(), ATPostAlterTypeParse(), AtSubCommit_Notify(), build_joinrel_restrictlist(), build_paths_for_OR(), check_index_predicates(), choose_bitmap_and(), clean_up_removed_plan_level(), consider_groupingsets_paths(), ConstraintImpliedByRelConstraint(), convert_EXISTS_sublink_to_join(), cost_index(), create_append_path(), create_append_plan(), create_bitmap_subplan(), create_index_paths(), create_join_plan(), create_merge_append_plan(), deconstruct_recurse(), DefineRelation(), deparseDirectDeleteSql(), deparseDirectUpdateSql(), deparseFromExprForRel(), estimate_path_cost_size(), expand_groupingset_node(), ExpandAllTables(), expandRTE(), extract_or_clause(), extract_rollup_sets(), fileBeginForeignScan(), fileGetOptions(), find_forced_null_vars(), find_indexpath_quals(), find_mergeclauses_for_outer_pathkeys(), find_nonnullable_vars_walker(), fireRIRrules(), flatten_grouping_sets(), foreign_grouping_ok(), foreign_join_ok(), gen_partprune_steps_internal(), gen_prune_steps_from_opexps(), generate_bitmap_or_paths(), generate_join_implied_equalities(), generate_join_implied_equalities_for_ecs(), generate_join_implied_equalities_normal(), generate_partition_qual(), get_baserel_parampathinfo(), get_batch_size_option(), get_foreign_key_join_selectivity(), get_from_clause_item(), get_index_paths(), get_join_index_paths(), get_joinrel_parampathinfo(), get_relation_constraints(), get_rels_with_domain(), get_steps_using_prefix_recurse(), GetPubPartitionOptionRelations(), is_parallel_safe(), objectsInSchemaToOids(), process_equivalence(), process_sublinks_mutator(), ProcessUtilitySlow(), pull_ands(), pull_ors(), pull_up_simple_subquery(), pull_up_simple_union_all(), reduce_outer_joins_pass2(), reduce_unique_semijoins(), reorder_grouping_sets(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), selectColorTrigrams(), set_joinrel_partition_key_exprs(), set_plan_refs(), split_pathtarget_at_srfs(), split_pathtarget_walker(), TidQualFromRestrictInfoList(), transformAExprIn(), transformAlterTableStmt(), transformCreateSchemaStmt(), transformCreateStmt(), transformExpressionList(), transformExtendedStatistics(), transformFromClause(), transformFromClauseItem(), transformIndexConstraints(), transformTargetList(), and vacuum().

531 {
532  int new_len;
533 
534  if (list1 == NIL)
535  return list_copy(list2);
536  if (list2 == NIL)
537  return list1;
538 
539  Assert(list1->type == list2->type);
540 
541  new_len = list1->length + list2->length;
542  /* Enlarge array if necessary */
543  if (new_len > list1->max_length)
544  enlarge_list(list1, new_len);
545 
546  /* Even if list1 == list2, using memcpy should be safe here */
547  memcpy(&list1->elements[list1->length], &list2->elements[0],
548  list2->length * sizeof(ListCell));
549  list1->length = new_len;
550 
551  check_list_invariants(list1);
552  return list1;
553 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_copy(const List *oldlist)
Definition: list.c:1418
static void enlarge_list(List *list, int min_size)
Definition: list.c:152
int max_length
Definition: pg_list.h:54
ListCell * elements
Definition: pg_list.h:55
#define Assert(condition)
Definition: c.h:804
int length
Definition: pg_list.h:53
NodeTag type
Definition: pg_list.h:52

◆ list_concat_copy()

pg_nodiscard List* list_concat_copy ( const List list1,
const List list2 
)

Definition at line 567 of file list.c.

References Assert, check_list_invariants, List::elements, List::length, list_copy(), new_list(), NIL, and List::type.

Referenced by add_function_defaults(), btadjustmembers(), build_paths_for_OR(), choose_bitmap_and(), create_scan_plan(), DefineIndex(), gen_partprune_steps(), generate_bitmap_or_paths(), get_parameterized_baserel_size(), hashadjustmembers(), make_pathkeys_for_window(), max_parallel_hazard_walker(), process_matched_tle(), set_joinrel_partition_key_exprs(), simplify_and_arguments(), and simplify_or_arguments().

568 {
569  List *result;
570  int new_len;
571 
572  if (list1 == NIL)
573  return list_copy(list2);
574  if (list2 == NIL)
575  return list_copy(list1);
576 
577  Assert(list1->type == list2->type);
578 
579  new_len = list1->length + list2->length;
580  result = new_list(list1->type, new_len);
581  memcpy(result->elements, list1->elements,
582  list1->length * sizeof(ListCell));
583  memcpy(result->elements + list1->length, list2->elements,
584  list2->length * sizeof(ListCell));
585 
586  check_list_invariants(result);
587  return result;
588 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_copy(const List *oldlist)
Definition: list.c:1418
ListCell * elements
Definition: pg_list.h:55
#define Assert(condition)
Definition: c.h:804
int length
Definition: pg_list.h:53
NodeTag type
Definition: pg_list.h:52
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_concat_unique()

pg_nodiscard List* list_concat_unique ( List list1,
const List list2 
)

Definition at line 1252 of file list.c.

References Assert, check_list_invariants, IsPointerList, lappend(), lfirst, and list_member().

Referenced by create_bitmap_subplan(), and select_active_windows().

1253 {
1254  ListCell *cell;
1255 
1256  Assert(IsPointerList(list1));
1257  Assert(IsPointerList(list2));
1258 
1259  foreach(cell, list2)
1260  {
1261  if (!list_member(list1, lfirst(cell)))
1262  list1 = lappend(list1, lfirst(cell));
1263  }
1264 
1265  check_list_invariants(list1);
1266  return list1;
1267 }
#define check_list_invariants(l)
Definition: list.c:77
bool list_member(const List *list, const void *datum)
Definition: list.c:628
#define IsPointerList(l)
Definition: list.c:54
List * lappend(List *list, void *datum)
Definition: list.c:336
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_concat_unique_int()

pg_nodiscard List* list_concat_unique_int ( List list1,
const List list2 
)

Definition at line 1295 of file list.c.

References Assert, check_list_invariants, IsIntegerList, lappend_int(), lfirst_int, and list_member_int().

1296 {
1297  ListCell *cell;
1298 
1299  Assert(IsIntegerList(list1));
1300  Assert(IsIntegerList(list2));
1301 
1302  foreach(cell, list2)
1303  {
1304  if (!list_member_int(list1, lfirst_int(cell)))
1305  list1 = lappend_int(list1, lfirst_int(cell));
1306  }
1307 
1308  check_list_invariants(list1);
1309  return list1;
1310 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsIntegerList(l)
Definition: list.c:55
#define lfirst_int(lc)
Definition: pg_list.h:170
bool list_member_int(const List *list, int datum)
Definition: list.c:669
List * lappend_int(List *list, int datum)
Definition: list.c:354
#define Assert(condition)
Definition: c.h:804

◆ list_concat_unique_oid()

pg_nodiscard List* list_concat_unique_oid ( List list1,
const List list2 
)

Definition at line 1316 of file list.c.

References Assert, check_list_invariants, IsOidList, lappend_oid(), lfirst_oid, and list_member_oid().

Referenced by GetRelationPublicationActions().

1317 {
1318  ListCell *cell;
1319 
1320  Assert(IsOidList(list1));
1321  Assert(IsOidList(list2));
1322 
1323  foreach(cell, list2)
1324  {
1325  if (!list_member_oid(list1, lfirst_oid(cell)))
1326  list1 = lappend_oid(list1, lfirst_oid(cell));
1327  }
1328 
1329  check_list_invariants(list1);
1330  return list1;
1331 }
#define check_list_invariants(l)
Definition: list.c:77
List * lappend_oid(List *list, Oid datum)
Definition: list.c:372
#define IsOidList(l)
Definition: list.c:56
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:689
#define Assert(condition)
Definition: c.h:804
#define lfirst_oid(lc)
Definition: pg_list.h:171

◆ list_concat_unique_ptr()

pg_nodiscard List* list_concat_unique_ptr ( List list1,
const List list2 
)

Definition at line 1274 of file list.c.

References Assert, check_list_invariants, IsPointerList, lappend(), lfirst, and list_member_ptr().

1275 {
1276  ListCell *cell;
1277 
1278  Assert(IsPointerList(list1));
1279  Assert(IsPointerList(list2));
1280 
1281  foreach(cell, list2)
1282  {
1283  if (!list_member_ptr(list1, lfirst(cell)))
1284  list1 = lappend(list1, lfirst(cell));
1285  }
1286 
1287  check_list_invariants(list1);
1288  return list1;
1289 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsPointerList(l)
Definition: list.c:54
List * lappend(List *list, void *datum)
Definition: list.c:336
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:649
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_copy()

pg_nodiscard List* list_copy ( const List list)

Definition at line 1418 of file list.c.

References check_list_invariants, List::elements, List::length, new_list(), NIL, and List::type.

Referenced by accumulate_append_subpath(), addRangeTableEntryForCTE(), arrayconst_startup_fn(), arrayexpr_startup_fn(), build_subplan(), check_index_predicates(), consider_groupingsets_paths(), ConstraintImpliedByRelConstraint(), copy_pathtarget(), copyObjectImpl(), CopyOverrideSearchPath(), create_append_plan(), create_merge_append_plan(), does_not_exist_skipping(), EventTriggerCollectGrant(), ExecuteTruncateGuts(), expand_indexqual_rowcompare(), expression_tree_mutator(), fetch_search_path(), generate_mergejoin_paths(), get_eclass_for_sort_expr(), get_foreign_key_join_selectivity(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_opf_member(), get_object_address_relobject(), get_query_def(), get_required_extension(), get_steps_using_prefix_recurse(), get_switched_clauses(), get_useful_pathkeys_for_relation(), GetOverrideSearchPath(), heap_truncate_find_FKs(), list_concat(), list_concat_copy(), list_difference(), list_difference_int(), list_difference_oid(), list_difference_ptr(), list_union(), list_union_int(), list_union_oid(), list_union_ptr(), merge_publications(), owningrel_does_not_exist_skipping(), process_owned_by(), PushOverrideSearchPath(), recomputeNamespacePath(), RelationGetIndexList(), RelationGetStatExtList(), remove_rel_from_query(), reorder_grouping_sets(), roles_is_member_of(), select_active_windows(), select_outer_pathkeys_for_merge(), set_joinrel_partition_key_exprs(), set_using_names(), SetReindexPending(), simplify_and_arguments(), simplify_or_arguments(), sort_inner_and_outer(), transformPLAssignStmt(), transformWithClause(), and truncate_useless_pathkeys().

1419 {
1420  List *newlist;
1421 
1422  if (oldlist == NIL)
1423  return NIL;
1424 
1425  newlist = new_list(oldlist->type, oldlist->length);
1426  memcpy(newlist->elements, oldlist->elements,
1427  newlist->length * sizeof(ListCell));
1428 
1429  check_list_invariants(newlist);
1430  return newlist;
1431 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
int length
Definition: pg_list.h:53
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_copy_deep()

pg_nodiscard List* list_copy_deep ( const List oldlist)

Definition at line 1463 of file list.c.

References Assert, check_list_invariants, copyObjectImpl(), List::elements, i, IsA, List::length, lfirst, new_list(), NIL, and List::type.

Referenced by copyObjectImpl().

1464 {
1465  List *newlist;
1466 
1467  if (oldlist == NIL)
1468  return NIL;
1469 
1470  /* This is only sensible for pointer Lists */
1471  Assert(IsA(oldlist, List));
1472 
1473  newlist = new_list(oldlist->type, oldlist->length);
1474  for (int i = 0; i < newlist->length; i++)
1475  lfirst(&newlist->elements[i]) =
1476  copyObjectImpl(lfirst(&oldlist->elements[i]));
1477 
1478  check_list_invariants(newlist);
1479  return newlist;
1480 }
#define NIL
Definition: pg_list.h:65
#define IsA(nodeptr, _type_)
Definition: nodes.h:587
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169
int length
Definition: pg_list.h:53
NodeTag type
Definition: pg_list.h:52
int i
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88
void * copyObjectImpl(const void *from)
Definition: copyfuncs.c:4978

◆ list_copy_tail()

pg_nodiscard List* list_copy_tail ( const List list,
int  nskip 
)

Definition at line 1437 of file list.c.

References check_list_invariants, List::elements, List::length, new_list(), NIL, and List::type.

Referenced by accumulate_append_subpath(), add_function_defaults(), addRangeTableEntryForJoin(), addRangeTableEntryForTableFunc(), does_not_exist_skipping(), expandRTE(), func_get_detail(), get_name_for_var_field(), get_object_address_opcf(), ParseFuncOrColumn(), push_ancestor_plan(), and transformAggregateCall().

1438 {
1439  List *newlist;
1440 
1441  if (nskip < 0)
1442  nskip = 0; /* would it be better to elog? */
1443 
1444  if (oldlist == NIL || nskip >= oldlist->length)
1445  return NIL;
1446 
1447  newlist = new_list(oldlist->type, oldlist->length - nskip);
1448  memcpy(newlist->elements, &oldlist->elements[nskip],
1449  newlist->length * sizeof(ListCell));
1450 
1451  check_list_invariants(newlist);
1452  return newlist;
1453 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
int length
Definition: pg_list.h:53
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_deduplicate_oid()

void list_deduplicate_oid ( List list)

Definition at line 1340 of file list.c.

References Assert, check_list_invariants, List::elements, i, IsOidList, List::length, list_length(), and ListCell::oid_value.

Referenced by heap_truncate_find_FKs().

1341 {
1342  int len;
1343 
1344  Assert(IsOidList(list));
1345  len = list_length(list);
1346  if (len > 1)
1347  {
1348  ListCell *elements = list->elements;
1349  int i = 0;
1350 
1351  for (int j = 1; j < len; j++)
1352  {
1353  if (elements[i].oid_value != elements[j].oid_value)
1354  elements[++i].oid_value = elements[j].oid_value;
1355  }
1356  list->length = i + 1;
1357  }
1358  check_list_invariants(list);
1359 }
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
#define IsOidList(l)
Definition: list.c:56
#define Assert(condition)
Definition: c.h:804
static int list_length(const List *l)
Definition: pg_list.h:149
int length
Definition: pg_list.h:53
Oid oid_value
Definition: pg_list.h:47
int i

◆ list_delete()

pg_nodiscard List* list_delete ( List list,
void *  datum 
)

Definition at line 792 of file list.c.

References Assert, check_list_invariants, equal(), IsPointerList, lfirst, sort-test::list, and list_delete_cell().

Referenced by postgresGetForeignPlan(), and unregister_ENR().

793 {
794  ListCell *cell;
795 
796  Assert(IsPointerList(list));
797  check_list_invariants(list);
798 
799  foreach(cell, list)
800  {
801  if (equal(lfirst(cell), datum))
802  return list_delete_cell(list, cell);
803  }
804 
805  /* Didn't find a match: return the list unmodified */
806  return list;
807 }
bool equal(const void *a, const void *b)
Definition: equalfuncs.c:3149
#define check_list_invariants(l)
Definition: list.c:77
#define IsPointerList(l)
Definition: list.c:54
List * list_delete_cell(List *list, ListCell *cell)
Definition: list.c:782
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_delete_cell()

pg_nodiscard List* list_delete_cell ( List list,
ListCell cell 
)

Definition at line 782 of file list.c.

References List::elements, and list_delete_nth_cell().

Referenced by list_delete(), list_delete_int(), list_delete_oid(), list_delete_ptr(), remove_useless_joins(), and transformGenericOptions().

783 {
784  return list_delete_nth_cell(list, cell - list->elements);
785 }
ListCell * elements
Definition: pg_list.h:55
List * list_delete_nth_cell(List *list, int n)
Definition: list.c:711

◆ list_delete_first()

◆ list_delete_int()

pg_nodiscard List* list_delete_int ( List list,
int  datum 
)

Definition at line 830 of file list.c.

References Assert, check_list_invariants, IsIntegerList, lfirst_int, sort-test::list, and list_delete_cell().

Referenced by reorder_grouping_sets().

831 {
832  ListCell *cell;
833 
834  Assert(IsIntegerList(list));
835  check_list_invariants(list);
836 
837  foreach(cell, list)
838  {
839  if (lfirst_int(cell) == datum)
840  return list_delete_cell(list, cell);
841  }
842 
843  /* Didn't find a match: return the list unmodified */
844  return list;
845 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsIntegerList(l)
Definition: list.c:55
#define lfirst_int(lc)
Definition: pg_list.h:170
List * list_delete_cell(List *list, ListCell *cell)
Definition: list.c:782
#define Assert(condition)
Definition: c.h:804

◆ list_delete_last()

pg_nodiscard List* list_delete_last ( List list)

Definition at line 892 of file list.c.

References check_list_invariants, list_free(), list_length(), list_truncate(), and NIL.

Referenced by CheckAttributeType(), fireRIRrules(), inline_function(), LockViewRecurse(), relation_is_updatable(), RewriteQuery(), transformMultiAssignRef(), and transformOnConflictClause().

893 {
894  check_list_invariants(list);
895 
896  if (list == NIL)
897  return NIL; /* would an error be better? */
898 
899  /* list_truncate won't free list if it goes to empty, but this should */
900  if (list_length(list) <= 1)
901  {
902  list_free(list);
903  return NIL;
904  }
905 
906  return list_truncate(list, list_length(list) - 1);
907 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_truncate(List *list, int new_size)
Definition: list.c:600
static int list_length(const List *l)
Definition: pg_list.h:149
void list_free(List *list)
Definition: list.c:1391

◆ list_delete_nth_cell()

pg_nodiscard List* list_delete_nth_cell ( List list,
int  n 
)

Definition at line 711 of file list.c.

References Assert, check_list_invariants, List::elements, GetMemoryChunkContext(), List::initial_elements, List::length, sort-test::list, list_free(), List::max_length, MemoryContextAlloc(), NIL, pfree(), and VALGRIND_MAKE_MEM_NOACCESS.

Referenced by generateSerialExtraStmts(), list_delete_cell(), list_delete_first(), MergeAttributes(), process_equivalence(), reconsider_full_join_clause(), and sort_inner_and_outer().

712 {
713  check_list_invariants(list);
714 
715  Assert(n >= 0 && n < list->length);
716 
717  /*
718  * If we're about to delete the last node from the list, free the whole
719  * list instead and return NIL, which is the only valid representation of
720  * a zero-length list.
721  */
722  if (list->length == 1)
723  {
724  list_free(list);
725  return NIL;
726  }
727 
728  /*
729  * Otherwise, we normally just collapse out the removed element. But for
730  * debugging purposes, move the whole list contents someplace else.
731  *
732  * (Note that we *must* keep the contents in the same memory context.)
733  */
734 #ifndef DEBUG_LIST_MEMORY_USAGE
735  memmove(&list->elements[n], &list->elements[n + 1],
736  (list->length - 1 - n) * sizeof(ListCell));
737  list->length--;
738 #else
739  {
740  ListCell *newelems;
741  int newmaxlen = list->length - 1;
742 
743  newelems = (ListCell *)
745  newmaxlen * sizeof(ListCell));
746  memcpy(newelems, list->elements, n * sizeof(ListCell));
747  memcpy(&newelems[n], &list->elements[n + 1],
748  (list->length - 1 - n) * sizeof(ListCell));
749  if (list->elements != list->initial_elements)
750  pfree(list->elements);
751  else
752  {
753  /*
754  * As in enlarge_list(), clear the initial_elements[] space and/or
755  * mark it inaccessible.
756  */
757 #ifdef CLOBBER_FREED_MEMORY
758  wipe_mem(list->initial_elements,
759  list->max_length * sizeof(ListCell));
760 #else
762  list->max_length * sizeof(ListCell));
763 #endif
764  }
765  list->elements = newelems;
766  list->max_length = newmaxlen;
767  list->length--;
768  check_list_invariants(list);
769  }
770 #endif
771 
772  return list;
773 }
#define NIL
Definition: pg_list.h:65
#define VALGRIND_MAKE_MEM_NOACCESS(addr, size)
Definition: memdebug.h:27
#define check_list_invariants(l)
Definition: list.c:77
void pfree(void *pointer)
Definition: mcxt.c:1169
union ListCell ListCell
int max_length
Definition: pg_list.h:54
ListCell * elements
Definition: pg_list.h:55
#define Assert(condition)
Definition: c.h:804
int length
Definition: pg_list.h:53
void * MemoryContextAlloc(MemoryContext context, Size size)
Definition: mcxt.c:863
void list_free(List *list)
Definition: list.c:1391
ListCell initial_elements[FLEXIBLE_ARRAY_MEMBER]
Definition: pg_list.h:57
static MemoryContext GetMemoryChunkContext(void *pointer)
Definition: memutils.h:114

◆ list_delete_oid()

pg_nodiscard List* list_delete_oid ( List list,
Oid  datum 
)

Definition at line 849 of file list.c.

References Assert, check_list_invariants, IsOidList, lfirst_oid, sort-test::list, and list_delete_cell().

Referenced by RemoveReindexPending().

850 {
851  ListCell *cell;
852 
853  Assert(IsOidList(list));
854  check_list_invariants(list);
855 
856  foreach(cell, list)
857  {
858  if (lfirst_oid(cell) == datum)
859  return list_delete_cell(list, cell);
860  }
861 
862  /* Didn't find a match: return the list unmodified */
863  return list;
864 }
#define check_list_invariants(l)
Definition: list.c:77
List * list_delete_cell(List *list, ListCell *cell)
Definition: list.c:782
#define IsOidList(l)
Definition: list.c:56
#define Assert(condition)
Definition: c.h:804
#define lfirst_oid(lc)
Definition: pg_list.h:171

◆ list_delete_ptr()

pg_nodiscard List* list_delete_ptr ( List list,
void *  datum 
)

Definition at line 811 of file list.c.

References Assert, check_list_invariants, IsPointerList, lfirst, sort-test::list, and list_delete_cell().

Referenced by FreeExprContext(), and remove_join_clause_from_rels().

812 {
813  ListCell *cell;
814 
815  Assert(IsPointerList(list));
816  check_list_invariants(list);
817 
818  foreach(cell, list)
819  {
820  if (lfirst(cell) == datum)
821  return list_delete_cell(list, cell);
822  }
823 
824  /* Didn't find a match: return the list unmodified */
825  return list;
826 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsPointerList(l)
Definition: list.c:54
List * list_delete_cell(List *list, ListCell *cell)
Definition: list.c:782
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_difference()

List* list_difference ( const List list1,
const List list2 
)

Definition at line 1091 of file list.c.

References Assert, check_list_invariants, IsPointerList, lappend(), lfirst, list_copy(), list_member(), and NIL.

Referenced by create_hashjoin_plan(), create_mergejoin_plan(), create_tidscan_plan(), infer_arbiter_indexes(), and process_duplicate_ors().

1092 {
1093  const ListCell *cell;
1094  List *result = NIL;
1095 
1096  Assert(IsPointerList(list1));
1097  Assert(IsPointerList(list2));
1098 
1099  if (list2 == NIL)
1100  return list_copy(list1);
1101 
1102  foreach(cell, list1)
1103  {
1104  if (!list_member(list2, lfirst(cell)))
1105  result = lappend(result, lfirst(cell));
1106  }
1107 
1108  check_list_invariants(result);
1109  return result;
1110 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_copy(const List *oldlist)
Definition: list.c:1418
bool list_member(const List *list, const void *datum)
Definition: list.c:628
#define IsPointerList(l)
Definition: list.c:54
List * lappend(List *list, void *datum)
Definition: list.c:336
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169
Definition: pg_list.h:50

◆ list_difference_int()

List* list_difference_int ( const List list1,
const List list2 
)

Definition at line 1142 of file list.c.

References Assert, check_list_invariants, IsIntegerList, lappend_int(), lfirst_int, list_copy(), list_member_int(), and NIL.

Referenced by reorder_grouping_sets().

1143 {
1144  const ListCell *cell;
1145  List *result = NIL;
1146 
1147  Assert(IsIntegerList(list1));
1148  Assert(IsIntegerList(list2));
1149 
1150  if (list2 == NIL)
1151  return list_copy(list1);
1152 
1153  foreach(cell, list1)
1154  {
1155  if (!list_member_int(list2, lfirst_int(cell)))
1156  result = lappend_int(result, lfirst_int(cell));
1157  }
1158 
1159  check_list_invariants(result);
1160  return result;
1161 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_copy(const List *oldlist)
Definition: list.c:1418
#define IsIntegerList(l)
Definition: list.c:55
#define lfirst_int(lc)
Definition: pg_list.h:170
bool list_member_int(const List *list, int datum)
Definition: list.c:669
List * lappend_int(List *list, int datum)
Definition: list.c:354
#define Assert(condition)
Definition: c.h:804
Definition: pg_list.h:50

◆ list_difference_oid()

List* list_difference_oid ( const List list1,
const List list2 
)

Definition at line 1167 of file list.c.

References Assert, check_list_invariants, IsOidList, lappend_oid(), lfirst_oid, list_copy(), list_member_oid(), and NIL.

1168 {
1169  const ListCell *cell;
1170  List *result = NIL;
1171 
1172  Assert(IsOidList(list1));
1173  Assert(IsOidList(list2));
1174 
1175  if (list2 == NIL)
1176  return list_copy(list1);
1177 
1178  foreach(cell, list1)
1179  {
1180  if (!list_member_oid(list2, lfirst_oid(cell)))
1181  result = lappend_oid(result, lfirst_oid(cell));
1182  }
1183 
1184  check_list_invariants(result);
1185  return result;
1186 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_copy(const List *oldlist)
Definition: list.c:1418
List * lappend_oid(List *list, Oid datum)
Definition: list.c:372
#define IsOidList(l)
Definition: list.c:56
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:689
#define Assert(condition)
Definition: c.h:804
Definition: pg_list.h:50
#define lfirst_oid(lc)
Definition: pg_list.h:171

◆ list_difference_ptr()

List* list_difference_ptr ( const List list1,
const List list2 
)

Definition at line 1117 of file list.c.

References Assert, check_list_invariants, IsPointerList, lappend(), lfirst, list_copy(), list_member_ptr(), and NIL.

Referenced by create_bitmap_scan_plan(), and ExecuteTruncateGuts().

1118 {
1119  const ListCell *cell;
1120  List *result = NIL;
1121 
1122  Assert(IsPointerList(list1));
1123  Assert(IsPointerList(list2));
1124 
1125  if (list2 == NIL)
1126  return list_copy(list1);
1127 
1128  foreach(cell, list1)
1129  {
1130  if (!list_member_ptr(list2, lfirst(cell)))
1131  result = lappend(result, lfirst(cell));
1132  }
1133 
1134  check_list_invariants(result);
1135  return result;
1136 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
List * list_copy(const List *oldlist)
Definition: list.c:1418
#define IsPointerList(l)
Definition: list.c:54
List * lappend(List *list, void *datum)
Definition: list.c:336
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:649
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169
Definition: pg_list.h:50

◆ list_free()

void list_free ( List list)

Definition at line 1391 of file list.c.

References list_free_private().

Referenced by AfterTriggerSetState(), AlterIndexNamespaces(), arrayconst_cleanup_fn(), arrayexpr_cleanup_fn(), ATCheckPartitionsNotInUse(), AtEOSubXact_Namespace(), AtEOXact_Namespace(), ATExecChangeOwner(), ATExecDropNotNull(), ATExecSetTableSpace(), build_base_rel_tlists(), build_remote_returning(), BuildRelationExtStatistics(), calc_joinrel_size_estimate(), calculate_indexes_size(), calculate_toast_table_size(), check_datestyle(), check_log_destination(), check_search_path(), check_temp_tablespaces(), check_wal_consistency_checking(), choose_bitmap_and(), compute_semi_anti_join_factors(), CopyFrom(), CopyMultiInsertBufferFlush(), CopyMultiInsertInfoCleanup(), CreateExtensionInternal(), CreateTriggerFiringOn(), current_schema(), current_schemas(), DefineIndex(), DefineRelation(), distribute_qual_to_rels(), do_analyze_rel(), DropSubscription(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), EventTriggerTableRewrite(), ExecInitPartitionInfo(), ExecInsert(), ExecOpenIndices(), ExecRefreshMatView(), ExecResetTupleTable(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), ExecUpdate(), extract_lateral_references(), ExtractExtensionList(), find_all_inheritors(), find_compatible_agg(), find_computable_ec_member(), find_hash_columns(), find_placeholders_in_expr(), fix_placeholder_input_needed_levels(), generate_base_implied_equalities_no_const(), generate_partitionwise_join_paths(), get_rel_sync_entry(), get_relation_info(), get_relation_statistics(), get_steps_using_prefix_recurse(), hashagg_reset_spill_state(), heap_truncate_find_FKs(), index_concurrently_swap(), index_get_partition(), index_unchanged_by_update(), infer_arbiter_indexes(), list_delete_last(), list_delete_nth_cell(), make_group_input_target(), make_partial_grouping_target(), make_pathkeys_for_window(), make_sort_input_target(), make_window_input_target(), max_parallel_hazard_walker(), merge_list_bounds(), merge_range_bounds(), OpenTableList(), paraminfo_get_equal_hashops(), parse_hba_auth_opt(), pg_partition_root(), pgstat_write_statsfiles(), plpgsql_extra_checks_check_hook(), pop_ancestor_plan(), PopOverrideSearchPath(), PostmasterMain(), PrepareTempTablespaces(), preprocess_targetlist(), process_implied_equality(), ProcessUtilitySlow(), qual_is_pushdown_safe(), recomputeNamespacePath(), refresh_by_match_merge(), rel_sync_cache_relation_cb(), RelationCacheInvalidate(), RelationDestroyRelation(), RelationGetIndexAttrBitmap(), RelationGetIndexList(), RelationGetPrimaryKeyIndex(), RelationGetReplicaIndex(), RelationGetStatExtList(), relationHasPrimaryKey(), remove_dbtablespaces(), reorder_grouping_sets(), reparameterize_pathlist_by_child(), roles_is_member_of(), sepgsql_dml_privileges(), simplify_and_arguments(), simplify_or_arguments(), statext_mcv_clauselist_selectivity(), stringToQualifiedNameList(), textToQualifiedNameList(), toast_open_indexes(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformTableLikeClause(), transformValuesClause(), triggered_change_notification(), typeInheritsFrom(), vac_open_indexes(), and WaitForLockers().

1392 {
1393  list_free_private(list, false);
1394 }
static void list_free_private(List *list, bool deep)
Definition: list.c:1365

◆ list_free_deep()

void list_free_deep ( List list)

Definition at line 1405 of file list.c.

References Assert, IsPointerList, and list_free_private().

Referenced by AfterTriggerFreeQuery(), checkSharedDependencies(), DetachPartitionFinalize(), Exec_UnlistenAllCommit(), FetchTableStates(), FreeSubscription(), get_rel_sync_entry(), gettype(), gistbufferinginserttuples(), load_libraries(), lookup_proof_cache(), PostmasterMain(), RelationDestroyRelation(), RelationGetFKeyList(), rescanLatestTimeLine(), StartReplication(), verify_heapam(), WaitForLockersMultiple(), XLogReadDetermineTimeline(), and XLogSendPhysical().

1406 {
1407  /*
1408  * A "deep" free operation only makes sense on a list of pointers.
1409  */
1410  Assert(IsPointerList(list));
1411  list_free_private(list, true);
1412 }
#define IsPointerList(l)
Definition: list.c:54
#define Assert(condition)
Definition: c.h:804
static void list_free_private(List *list, bool deep)
Definition: list.c:1365

◆ list_head()

static ListCell* list_head ( const List l)
inlinestatic

Definition at line 125 of file pg_list.h.

References List::elements.

Referenced by analyzeCTE(), appendTypeNameToBuffer(), arrayexpr_startup_fn(), assign_hypothetical_collations(), ATAddForeignKeyConstraint(), boolexpr_startup_fn(), build_index_tlist(), buildRelationAliases(), CheckRADIUSAuth(), checkWellFormedRecursionWalker(), coerce_record_to_complex(), compare_tlist_datatypes(), ComputeIndexAttrs(), consider_groupingsets_paths(), ConstructTupleDescriptor(), cost_bitmap_and_node(), cost_bitmap_or_node(), create_ctas_nodata(), create_mergejoin_plan(), DefineView(), deparseSubscriptingRef(), deparseTruncateSql(), do_analyze_rel(), dump_getdiag(), examine_variable(), exec_stmt_raise(), ExecInitJunkFilterConversion(), expand_insert_targetlist(), expandRTE(), extract_rollup_sets(), fix_indexqual_operand(), flatten_set_variable_args(), FormIndexDatum(), FormPartitionKeyDatum(), funcname_signature_string(), gen_prune_steps_from_opexps(), generate_append_tlist(), generate_setop_grouplist(), generateClonedIndexStmt(), get_qual_for_hash(), get_qual_for_range(), get_range_nulltest(), get_steps_using_prefix(), get_update_query_targetlist_def(), GetIndexInputType(), has_partition_attrs(), intorel_startup(), join_search_one_level(), jsonb_path_query_internal(), list_startup_fn(), make_inner_pathkeys_for_merge(), makeDependencyGraphWalker(), match_index_to_operand(), NameListToQuotedString(), NameListToString(), OverrideSearchPathMatchesCurrent(), parse_hba_line(), parse_ident_line(), perform_pruning_base_step(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), postprocess_setop_tlist(), PreCommit_Notify(), print_function_arguments(), printSubscripts(), process_startup_options(), query_is_distinct_for(), RelationBuildPartitionKey(), rewriteSearchAndCycle(), SendRowDescriptionMessage(), set_baserel_partition_key_exprs(), sort_inner_and_outer(), tfuncLoadRows(), tlist_matches_tupdesc(), tlist_same_collations(), tlist_same_datatypes(), transformAssignedExpr(), transformPLAssignStmt(), transformUpdateTargetList(), trim_mergeclauses_for_inner_pathkeys(), try_partitionwise_join(), and TypeNameListToString().

126 {
127  return l ? &l->elements[0] : NULL;
128 }
ListCell * elements
Definition: pg_list.h:55

◆ list_insert_nth()

pg_nodiscard List* list_insert_nth ( List list,
int  pos,
void *  datum 
)

Definition at line 415 of file list.c.

References Assert, check_list_invariants, insert_new_cell(), IsPointerList, lfirst, sort-test::list, list_make1, and NIL.

Referenced by add_partial_path(), add_path(), and merge_clump().

416 {
417  if (list == NIL)
418  {
419  Assert(pos == 0);
420  return list_make1(datum);
421  }
422  Assert(IsPointerList(list));
423  lfirst(insert_new_cell(list, pos)) = datum;
424  check_list_invariants(list);
425  return list;
426 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
static ListCell * insert_new_cell(List *list, int pos)
Definition: list.c:394
#define list_make1(x1)
Definition: pg_list.h:206
#define IsPointerList(l)
Definition: list.c:54
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_insert_nth_int()

pg_nodiscard List* list_insert_nth_int ( List list,
int  pos,
int  datum 
)

Definition at line 429 of file list.c.

References Assert, check_list_invariants, insert_new_cell(), IsIntegerList, lfirst_int, sort-test::list, list_make1_int, and NIL.

430 {
431  if (list == NIL)
432  {
433  Assert(pos == 0);
434  return list_make1_int(datum);
435  }
436  Assert(IsIntegerList(list));
437  lfirst_int(insert_new_cell(list, pos)) = datum;
438  check_list_invariants(list);
439  return list;
440 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
static ListCell * insert_new_cell(List *list, int pos)
Definition: list.c:394
#define IsIntegerList(l)
Definition: list.c:55
#define lfirst_int(lc)
Definition: pg_list.h:170
#define list_make1_int(x1)
Definition: pg_list.h:221
#define Assert(condition)
Definition: c.h:804

◆ list_insert_nth_oid()

pg_nodiscard List* list_insert_nth_oid ( List list,
int  pos,
Oid  datum 
)

Definition at line 443 of file list.c.

References Assert, check_list_invariants, insert_new_cell(), IsOidList, lfirst_oid, sort-test::list, list_make1_oid, and NIL.

444 {
445  if (list == NIL)
446  {
447  Assert(pos == 0);
448  return list_make1_oid(datum);
449  }
450  Assert(IsOidList(list));
451  lfirst_oid(insert_new_cell(list, pos)) = datum;
452  check_list_invariants(list);
453  return list;
454 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
static ListCell * insert_new_cell(List *list, int pos)
Definition: list.c:394
#define list_make1_oid(x1)
Definition: pg_list.h:236
#define IsOidList(l)
Definition: list.c:56
#define Assert(condition)
Definition: c.h:804
#define lfirst_oid(lc)
Definition: pg_list.h:171

◆ list_int_cmp()

int list_int_cmp ( const ListCell p1,
const ListCell p2 
)

Definition at line 1513 of file list.c.

References lfirst_int.

Referenced by expand_grouping_sets().

1514 {
1515  int v1 = lfirst_int(p1);
1516  int v2 = lfirst_int(p2);
1517 
1518  if (v1 < v2)
1519  return -1;
1520  if (v1 > v2)
1521  return 1;
1522  return 0;
1523 }
#define lfirst_int(lc)
Definition: pg_list.h:170

◆ list_intersection()

List* list_intersection ( const List list1,
const List list2 
)

Definition at line 1033 of file list.c.

References Assert, check_list_invariants, IsPointerList, lappend(), lfirst, list_member(), and NIL.

Referenced by find_nonnullable_vars_walker(), and reduce_outer_joins_pass2().

1034 {
1035  List *result;
1036  const ListCell *cell;
1037 
1038  if (list1 == NIL || list2 == NIL)
1039  return NIL;
1040 
1041  Assert(IsPointerList(list1));
1042  Assert(IsPointerList(list2));
1043 
1044  result = NIL;
1045  foreach(cell, list1)
1046  {
1047  if (list_member(list2, lfirst(cell)))
1048  result = lappend(result, lfirst(cell));
1049  }
1050 
1051  check_list_invariants(result);
1052  return result;
1053 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
bool list_member(const List *list, const void *datum)
Definition: list.c:628
#define IsPointerList(l)
Definition: list.c:54
List * lappend(List *list, void *datum)
Definition: list.c:336
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169
Definition: pg_list.h:50

◆ list_intersection_int()

List* list_intersection_int ( const List list1,
const List list2 
)

Definition at line 1059 of file list.c.

References Assert, check_list_invariants, IsIntegerList, lappend_int(), lfirst_int, list_member_int(), and NIL.

Referenced by parseCheckAggregates().

1060 {
1061  List *result;
1062  const ListCell *cell;
1063 
1064  if (list1 == NIL || list2 == NIL)
1065  return NIL;
1066 
1067  Assert(IsIntegerList(list1));
1068  Assert(IsIntegerList(list2));
1069 
1070  result = NIL;
1071  foreach(cell, list1)
1072  {
1073  if (list_member_int(list2, lfirst_int(cell)))
1074  result = lappend_int(result, lfirst_int(cell));
1075  }
1076 
1077  check_list_invariants(result);
1078  return result;
1079 }
#define NIL
Definition: pg_list.h:65
#define check_list_invariants(l)
Definition: list.c:77
#define IsIntegerList(l)
Definition: list.c:55
#define lfirst_int(lc)
Definition: pg_list.h:170
bool list_member_int(const List *list, int datum)
Definition: list.c:669
List * lappend_int(List *list, int datum)
Definition: list.c:354
#define Assert(condition)
Definition: c.h:804
Definition: pg_list.h:50

◆ list_last_cell()

static ListCell* list_last_cell ( const List list)
inlinestatic

Definition at line 267 of file pg_list.h.

References Assert, List::elements, List::length, and NIL.

268 {
269  Assert(list != NIL);
270  return &list->elements[list->length - 1];
271 }
#define NIL
Definition: pg_list.h:65
ListCell * elements
Definition: pg_list.h:55
#define Assert(condition)
Definition: c.h:804
int length
Definition: pg_list.h:53

◆ list_length()

static int list_length ( const List l)
inlinestatic

Definition at line 149 of file pg_list.h.

References List::length.

Referenced by _copyMergeJoin(), _outForeignKeyOptInfo(), _outMergeJoin(), _outPathTarget(), _readMergeJoin(), _SPI_execute_plan(), acquire_inherited_sample_rows(), add_child_join_rel_equivalences(), add_child_rel_equivalences(), add_column_to_pathtarget(), add_function_defaults(), add_paths_to_append_rel(), add_paths_to_grouping_rel(), add_row_identity_var(), add_security_quals(), add_sp_item_to_pathtarget(), add_to_flat_tlist(), add_with_check_options(), AddEventToPendingNotifies(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRoleMems(), adjust_appendrel_attrs_mutator(), adjust_inherited_attnums(), adjust_paths_for_srfs(), AllTablesyncsReady(), AlterDatabase(), AlterPublicationTables(), AlterSubscription_refresh(), analyzeCTETargetList(), apply_tlist_labeling(), ApplyRetrieveRule(), array_subscript_transform(), assign_hypothetical_collations(), assign_ordered_set_collations(), assign_param_for_placeholdervar(), assign_param_for_var(), assign_special_exec_param(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAlterColumnType(), ATPrepChangePersistence(), AttachPartitionEnsureIndexes(), BeginCopyFrom(), BeginCopyTo(), btvalidate(), build_expr_data(), build_local_reloptions(), build_merged_partition_bounds(), build_pertrans_for_aggref(), build_remote_returning(), build_simple_rel(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), BuildDescForRelation(), BuildDescFromLists(), buildNSItemFromLists(), buildNSItemFromTupleDesc(), buildRelationAliases(), BuildRelationExtStatistics(), cached_plan_cost(), can_minmax_aggs(), check_hashjoinable(), check_memoizable(), check_mergejoinable(), check_selective_binary_conversion(), check_sql_fn_retval(), check_temp_tablespaces(), check_ungrouped_columns_walker(), CheckIndexCompatible(), CheckRADIUSAuth(), choose_best_statistics(), choose_bitmap_and(), choose_hashed_setop(), ChoosePortalStrategy(), classify_index_clause_usage(), clause_is_strict_for(), clauselist_selectivity_ext(), cmp_list_len_asc(), coerce_fn_result_column(), common_prefix_cmp(), commute_restrictinfo(), CommuteOpExpr(), compute_partition_bounds(), compute_semijoin_info(), ComputeIndexAttrs(), connect_pg_server(), consider_groupingsets_paths(), consider_index_join_clauses(), consider_index_join_outer_rels(), conversion_error_callback(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), convert_requires_to_datum(), convert_subquery_pathkeys(), convert_testexpr_mutator(), cookConstraint(), copy_pathtarget(), CopyFrom(), CopyMultiInsertInfoFlush(), CopyOneRowTo(), cost_agg(), count_rowexpr_columns(), create_agg_path(), create_agg_plan(), create_append_path(), create_append_plan(), create_bitmap_subplan(), create_ctescan_plan(), create_degenerate_grouping_paths(), create_final_distinct_paths(), create_foreign_modify(), create_group_path(), create_group_plan(), create_groupingsets_path(), create_groupingsets_plan(), create_hashjoin_plan(), create_indexscan_plan(), create_limit_plan(), create_memoize_plan(), create_merge_append_path(), create_merge_append_plan(), create_mergejoin_plan(), create_modifytable_path(), create_ordered_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_setop_path(), create_tidscan_plan(), create_unique_path(), create_unique_plan(), create_windowagg_path(), create_windowagg_plan(), CreateFunction(), CreatePublication(), CreateStatistics(), CreateTriggerFiringOn(), current_schemas(), currtid_for_view(), deconstruct_recurse(), DeconstructQualifiedName(), DefineAggregate(), DefineCollation(), DefineDomain(), DefineIndex(), DefineQueryRewrite(), DefineRelation(), DefineVirtualRelation(), DelRoleMems(), deparse_context_for_plan_tree(), deparseDistinctExpr(), deparseOpExpr(), deparseRangeTblRef(), deparseScalarArrayOpExpr(), dependencies_clauselist_selectivity(), dependency_is_compatible_clause(), dependency_is_compatible_expression(), do_analyze_rel(), DoCopyTo(), does_not_exist_skipping(), domainAddConstraint(), eclass_useful_for_merging(), EnumValuesCreate(), equalRSDesc(), estimate_array_length(), estimate_hashagg_tablesize(), estimate_multivariate_ndistinct(), estimate_num_groups(), estimate_path_cost_size(), EstimateReindexStateSpace(), eval_const_expressions_mutator(), EvalPlanQualBegin(), EvalPlanQualStart(), EvaluateParams(), EventTriggerAlterTableEnd(), examine_opclause_args(), examine_simple_variable(), exec_eval_using_params(), exec_parse_message(), exec_save_simple_expr(), exec_simple_check_plan(), exec_simple_query(), ExecBuildAggTrans(), ExecBuildParamSetEqual(), ExecBuildUpdateProjection(), ExecCreatePartitionPruneState(), ExecCreateTableAs(), ExecEvalXmlExpr(), ExecHashTableCreate(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapOr(), ExecInitExprRec(), ExecInitFunc(), ExecInitFunctionScan(), ExecInitIndexScan(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitPartitionInfo(), ExecInitProjectSet(), ExecInitPruningContext(), ExecInitRangeTable(), ExecInitSubPlan(), ExecInitSubscriptingRef(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecMakeTableFunctionResult(), ExecOpenIndices(), ExecRefreshMatView(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSetParamPlan(), ExecSupportsMarkRestore(), ExecTargetListLength(), ExecTypeFromExprList(), ExecuteCallStmt(), ExecuteQuery(), ExecuteTruncateGuts(), expand_function_arguments(), expand_grouping_sets(), expand_groupingset_node(), expand_indexqual_rowcompare(), expand_inherited_rtentry(), expand_single_inheritance_child(), ExpandColumnRefStar(), ExpandIndirectionStar(), expandRecordVariable(), expandRTE(), expandTupleDesc(), ExplainCustomChildren(), ExplainNode(), ExplainOneUtility(), ExplainPrintTriggers(), ExplainTargetRel(), ExportSnapshot(), exprIsLengthCoercion(), extract_grouping_collations(), extract_grouping_cols(), extract_grouping_ops(), extract_jsp_path_expr(), extract_rollup_sets(), fetch_table_list(), FetchTableStates(), filter_list_to_array(), final_cost_mergejoin(), finalize_plan(), find_all_inheritors(), find_duplicate_ors(), find_expr_references_walker(), find_install_path(), find_join_rel(), find_modifytable_subplan(), findTargetlistEntrySQL92(), fireRIRrules(), fix_indexqual_clause(), fix_param_node(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_join_alias_vars_mutator(), flatten_set_variable_args(), flatten_simple_union_all(), for_both_cell_setup(), for_each_cell_setup(), foreign_expr_walker(), foreign_grouping_ok(), foreign_join_ok(), func_get_detail(), funcname_signature_string(), gather_grouping_paths(), gen_partprune_steps_internal(), gen_prune_step_op(), generate_append_tlist(), generate_base_implied_equalities(), generate_base_implied_equalities_const(), generate_implied_equalities_for_column(), generate_join_implied_equalities(), generate_join_implied_equalities_for_ecs(), generate_mergejoin_paths(), generate_new_exec_param(), generate_nonunion_paths(), generate_series_int4_support(), generate_series_int8_support(), generate_union_paths(), generate_useful_gather_paths(), genericcostestimate(), geqo_eval(), get_agg_expr(), get_aggregate_argtypes(), get_call_expr_arg_stable(), get_call_expr_argtype(), get_eclass_for_sort_expr(), get_expr_result_type(), get_foreign_key_join_selectivity(), get_from_clause_item(), get_func_expr(), get_func_sql_syntax(), get_join_variables(), get_matching_partitions(), get_memoize_path(), get_name_for_var_field(), get_number_of_groups(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_relobject(), get_oper_expr(), get_parameter(), get_partition_qual_relid(), get_qual_for_range(), get_query_def(), get_relation_foreign_keys(), get_restriction_variable(), get_rightop(), get_rtable_name(), get_rte_attribute_is_dropped(), get_rte_attribute_name(), get_rule_expr(), get_rule_groupingset(), get_simple_binary_op_name(), get_simple_values_rte(), get_singleton_append_subpath(), get_steps_using_prefix(), get_steps_using_prefix_recurse(), get_update_query_targetlist_def(), get_useful_pathkeys_for_relation(), get_variable(), get_view_query(), get_windowfunc_expr(), getIdentitySequence(), getInsertSelectQuery(), GetRTEByRangeTablePosn(), getTokenTypes(), gimme_tree(), gincostestimate(), gistbufferinginserttuples(), gistfinishsplit(), gistRelocateBuildBuffersOnSplit(), grouping_planner(), has_relevant_eclass_joinclause(), hash_ok_operator(), hashvalidate(), have_relevant_eclass_joinclause(), have_relevant_joinclause(), hstore_subscript_transform(), identify_join_columns(), init_sexpr(), initial_cost_hashjoin(), initialize_peragg(), inline_function(), inline_set_returning_function(), interpret_AS_clause(), interpret_function_parameter_list(), interval_support(), InvalidatePublicationRels(), is_safe_append_member(), is_simple_values(), is_strict_saop(), IsBinaryTidClause(), IsTidEqualAnyClause(), IsTransactionExitStmtList(), IsTransactionStmtList(), JsonValueListIsEmpty(), JsonValueListLength(), like_regex_support(), list_deduplicate_oid(), list_delete_last(), list_sort(), list_truncate(), lookup_var_attr_stats(), LookupFuncWithArgs(), LookupOperWithArgs(), LookupTypeNameExtended(), make_ands_explicit(), make_build_data(), make_callstmt_target(), make_jsp_expr_node_args(), make_memoize(), make_modifytable(), make_partition_op_expr(), make_partition_pruneinfo(), make_path_rowexpr(), make_pathtarget_from_tlist(), make_recursive_union(), make_rel_from_joinlist(), make_restrictinfo_internal(), make_row_comparison_op(), make_row_distinct_op(), make_ruledef(), make_setop(), make_setop_translation_list(), make_sort_from_groupcols(), make_sort_from_sortclauses(), make_sort_input_target(), make_union_unique(), make_unique_from_pathkeys(), make_unique_from_sortclauses(), make_viewdef(), MakeConfigurationMapping(), makeRangeVarFromNameList(), makeWholeRowVar(), markRTEForSelectPriv(), markTargetListOrigin(), match_clause_to_partition_key(), match_foreign_keys_to_quals(), match_opclause_to_indexcol(), MatchNamedCall(), mcv_get_match_bitmap(), mcv_match_expression(), merge_clump(), merge_list_bounds(), merge_range_bounds(), MergeAttributes(), MJExamineQuals(), network_subset_support(), NextCopyFrom(), numeric_support(), operator_predicate_proof(), order_qual_clauses(), ordered_set_startup(), owningrel_does_not_exist_skipping(), parse_hba_line(), parse_tsquery(), parseCheckAggregates(), ParseFuncOrColumn(), parseLocalRelOptions(), pathkeys_count_contained_in(), perform_base_backup(), perform_pruning_base_step(), PerformCursorOpen(), pg_get_function_arg_default(), pg_get_object_address(), pg_get_publication_tables(), pg_get_statisticsobj_worker(), pg_listening_channels(), pg_partition_ancestors(), pg_partition_tree(), pgoutput_startup(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), PLy_abort_open_subtransactions(), PLy_procedure_call(), policy_role_list_to_array(), postgresBeginDirectModify(), postgresBeginForeignScan(), postgresExplainForeignScan(), predicate_classify(), predicate_implied_by(), predicate_refuted_by(), prepare_sort_from_pathkeys(), PrepareQuery(), PrepareTempTablespaces(), preprocess_aggref(), preprocess_groupclause(), preprocess_grouping_sets(), preprocess_minmax_aggregates(), preprocess_targetlist(), print_expr(), print_function_arguments(), ProcedureCreate(), process_duplicate_ors(), process_owned_by(), processIndirection(), processTypesSpec(), prune_append_rel_partitions(), publicationListToArray(), pull_up_constant_function(), pull_up_simple_subquery(), pull_up_simple_union_all(), pull_up_simple_values(), pull_up_sublinks_qual_recurse(), pullup_replace_vars_callback(), query_is_distinct_for(), query_planner(), rebuild_fdw_scan_tlist(), ReceiveCopyBegin(), recheck_cast_function_args(), reconsider_full_join_clause(), reduce_outer_joins_pass2(), refresh_matview_datafill(), regnamespacein(), regrolein(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationBuildPartitionDesc(), remap_groupColIdx(), remove_dbtablespaces(), remove_useless_groupby_columns(), remove_useless_results_recurse(), RemoveRelations(), reorder_function_arguments(), reorder_grouping_sets(), replace_domain_constraint_value(), replace_empty_jointree(), replace_outer_agg(), replace_outer_grouping(), resolve_column_ref(), resolve_special_varno(), RewriteQuery(), rewriteRuleAction(), rewriteSearchAndCycle(), rewriteTargetView(), rewriteValuesRTE(), scalararraysel(), SearchCatCacheList(), select_active_windows(), select_outer_pathkeys_for_merge(), selectColorTrigrams(), SendCopyBegin(), SendNegotiateProtocolVersion(), SerializeReindexState(), set_append_references(), set_cte_pathlist(), set_deparse_context_plan(), set_deparse_for_query(), set_join_column_names(), set_mergeappend_references(), set_plan_references(), set_plan_refs(), set_relation_column_names(), set_rtable_names(), set_simple_column_names(), set_subquery_pathlist(), set_using_names(), set_values_size_estimates(), setup_simple_rel_arrays(), show_grouping_sets(), show_incremental_sort_group_info(), show_memoize_info(), show_plan_tlist(), show_sort_group_keys(), show_tablesample(), show_upper_qual(), simplify_boolean_equality(), sort_inner_and_outer(), SPI_cursor_open_internal(), SPI_is_cursor_plan(), SPI_plan_get_cached_plan(), split_pathtarget_walker(), sql_fn_post_column_ref(), SS_make_initplan_from_plan(), SS_process_ctes(), standard_ExecutorStart(), standard_join_search(), standard_planner(), standard_qp_callback(), statext_is_compatible_clause_internal(), statext_mcv_clauselist_selectivity(), StoreRelCheck(), strlist_to_textarray(), subquery_planner(), tablesample_init(), TemporalSimplify(), test_opexpr_is_hashable(), test_predtest(), TidExprListCreate(), TidListEval(), tlist_same_exprs(), to_regnamespace(), to_regrole(), toast_open_indexes(), trackDroppedObjectsNeeded(), transformAExprBetween(), transformAExprIn(), transformAExprOp(), transformAggregateCall(), transformCallStmt(), transformColumnDefinition(), transformColumnRef(), transformFromClauseItem(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexStmt(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformMultiAssignRef(), transformPartitionBound(), transformPartitionRangeBounds(), transformPartitionSpec(), transformPLAssignStmt(), transformRangeFunction(), transformRangeTableFunc(), transformRangeTableSample(), transformRowExpr(), transformRuleStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformStatsStmt(), transformSubLink(), transformValuesClause(), transformWholeRowRef(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), trivial_subqueryscan(), truncate_useless_pathkeys(), tsvector_update_trigger(), TypeGetTupleDesc(), typenameTypeMod(), typeStringToTypeName(), unify_hypothetical_args(), vac_open_indexes(), vacuum(), ValuesNext(), varbit_support(), varchar_support(), view_cols_are_auto_updatable(), view_query_is_auto_updatable(), and WaitForLockersMultiple().

150 {
151  return l ? l->length : 0;
152 }
int length
Definition: pg_list.h:53

◆ list_make1_impl()

List* list_make1_impl ( NodeTag  t,
ListCell  datum1 
)

Definition at line 233 of file list.c.

References check_list_invariants, List::elements, sort-test::list, and new_list().

234 {
235  List *list = new_list(t, 1);
236 
237  list->elements[0] = datum1;
238  check_list_invariants(list);
239  return list;
240 }
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_make2_impl()

List* list_make2_impl ( NodeTag  t,
ListCell  datum1,
ListCell  datum2 
)

Definition at line 243 of file list.c.

References check_list_invariants, List::elements, sort-test::list, and new_list().

244 {
245  List *list = new_list(t, 2);
246 
247  list->elements[0] = datum1;
248  list->elements[1] = datum2;
249  check_list_invariants(list);
250  return list;
251 }
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_make3_impl()

List* list_make3_impl ( NodeTag  t,
ListCell  datum1,
ListCell  datum2,
ListCell  datum3 
)

Definition at line 254 of file list.c.

References check_list_invariants, List::elements, sort-test::list, and new_list().

256 {
257  List *list = new_list(t, 3);
258 
259  list->elements[0] = datum1;
260  list->elements[1] = datum2;
261  list->elements[2] = datum3;
262  check_list_invariants(list);
263  return list;
264 }
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_make4_impl()

List* list_make4_impl ( NodeTag  t,
ListCell  datum1,
ListCell  datum2,
ListCell  datum3,
ListCell  datum4 
)

Definition at line 267 of file list.c.

References check_list_invariants, List::elements, sort-test::list, and new_list().

269 {
270  List *list = new_list(t, 4);
271 
272  list->elements[0] = datum1;
273  list->elements[1] = datum2;
274  list->elements[2] = datum3;
275  list->elements[3] = datum4;
276  check_list_invariants(list);
277  return list;
278 }
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_make5_impl()

List* list_make5_impl ( NodeTag  t,
ListCell  datum1,
ListCell  datum2,
ListCell  datum3,
ListCell  datum4,
ListCell  datum5 
)

Definition at line 281 of file list.c.

References check_list_invariants, List::elements, sort-test::list, and new_list().

283 {
284  List *list = new_list(t, 5);
285 
286  list->elements[0] = datum1;
287  list->elements[1] = datum2;
288  list->elements[2] = datum3;
289  list->elements[3] = datum4;
290  list->elements[4] = datum5;
291  check_list_invariants(list);
292  return list;
293 }
#define check_list_invariants(l)
Definition: list.c:77
ListCell * elements
Definition: pg_list.h:55
Definition: pg_list.h:50
static List * new_list(NodeTag type, int min_size)
Definition: list.c:88

◆ list_member()

bool list_member ( const List list,
const void *  datum 
)

Definition at line 628 of file list.c.

References Assert, check_list_invariants, equal(), IsPointerList, and lfirst.

Referenced by add_new_column_to_pathtarget(), analyzeCTE(), build_minmax_path(), create_bitmap_scan_plan(), ec_member_matches_foreign(), find_window_functions_walker(), group_by_has_partkey(), infer_arbiter_indexes(), list_append_unique(), list_concat_unique(), list_difference(), list_intersection(), list_union(), process_duplicate_ors(), split_pathtarget_at_srfs(), and split_pathtarget_walker().

629 {
630  const ListCell *cell;
631 
632  Assert(IsPointerList(list));
633  check_list_invariants(list);
634 
635  foreach(cell, list)
636  {
637  if (equal(lfirst(cell), datum))
638  return true;
639  }
640 
641  return false;
642 }
bool equal(const void *a, const void *b)
Definition: equalfuncs.c:3149
#define check_list_invariants(l)
Definition: list.c:77
#define IsPointerList(l)
Definition: list.c:54
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_member_int()

bool list_member_int ( const List list,
int  datum 
)

Definition at line 669 of file list.c.

References Assert, check_list_invariants, IsIntegerList, and lfirst_int.

Referenced by BeginCopyFrom(), BeginCopyTo(), check_ungrouped_columns_walker(), contain_exec_param_walker(), CopyGetAttnums(), estimate_num_groups(), ExecRelationIsTargetRelation(), init_returning_filter(), list_append_unique_int(), list_concat_unique_int(), list_difference_int(), list_intersection_int(), list_union_int(), max_parallel_hazard_walker(), parseCheckAggregates(), reorder_grouping_sets(), and transformDistinctOnClause().

670 {
671  const ListCell *cell;
672 
673  Assert(IsIntegerList(list));
674  check_list_invariants(list);
675 
676  foreach(cell, list)
677  {
678  if (lfirst_int(cell) == datum)
679  return true;
680  }
681 
682  return false;
683 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsIntegerList(l)
Definition: list.c:55
#define lfirst_int(lc)
Definition: pg_list.h:170
#define Assert(condition)
Definition: c.h:804

◆ list_member_oid()

bool list_member_oid ( const List list,
Oid  datum 
)

Definition at line 689 of file list.c.

References Assert, check_list_invariants, IsOidList, and lfirst_oid.

Referenced by AfterTriggerSaveEvent(), AlterTableMoveAll(), apply_handle_truncate(), ATExecAddInherit(), ATExecAttachPartition(), BeginCopyTo(), CheckAttributeType(), CloneFkReferenced(), CloneFkReferencing(), CollationIsVisible(), ConversionIsVisible(), DefineRelation(), ec_member_matches_indexcol(), ExecAlterObjectDependsStmt(), ExecCheckIndexConstraints(), ExecInitPartitionInfo(), ExecInsertIndexTuples(), ExecuteTruncate(), fireRIRrules(), FunctionIsVisible(), get_rel_sync_entry(), get_transform_fromsql(), get_transform_tosql(), has_privs_of_role(), hashvalidate(), have_partkey_equi_join(), heap_truncate_check_FKs(), heap_truncate_find_FKs(), inline_function(), is_member_of_role(), is_member_of_role_nosuper(), list_append_unique_oid(), list_concat_unique_oid(), list_difference_oid(), list_union_oid(), LockViewRecurse_walker(), lookup_shippable(), OpclassIsVisible(), OpenTableList(), OperatorIsVisible(), OpfamilyIsVisible(), pgstat_db_requested(), pgstat_recv_inquiry(), PlanCacheRelCallback(), recomputeNamespacePath(), ReindexIsProcessingIndex(), relation_has_unique_index_for(), relation_is_updatable(), RelationIsVisible(), RememberConstraintForRebuilding(), RememberIndexForRebuilding(), RememberStatisticsForRebuilding(), StatisticsObjIsVisible(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), typeInheritsFrom(), and TypeIsVisible().

690 {
691  const ListCell *cell;
692 
693  Assert(IsOidList(list));
694  check_list_invariants(list);
695 
696  foreach(cell, list)
697  {
698  if (lfirst_oid(cell) == datum)
699  return true;
700  }
701 
702  return false;
703 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsOidList(l)
Definition: list.c:56
#define Assert(condition)
Definition: c.h:804
#define lfirst_oid(lc)
Definition: pg_list.h:171

◆ list_member_ptr()

bool list_member_ptr ( const List list,
const void *  datum 
)

Definition at line 649 of file list.c.

References Assert, check_list_invariants, IsPointerList, and lfirst.

Referenced by create_bitmap_scan_plan(), create_tidrangescan_plan(), create_tidscan_plan(), get_foreign_key_join_selectivity(), list_append_unique_ptr(), list_concat_unique_ptr(), list_difference_ptr(), list_union_ptr(), postgresGetForeignPlan(), preprocess_groupclause(), and remove_join_clause_from_rels().

650 {
651  const ListCell *cell;
652 
653  Assert(IsPointerList(list));
654  check_list_invariants(list);
655 
656  foreach(cell, list)
657  {
658  if (lfirst(cell) == datum)
659  return true;
660  }
661 
662  return false;
663 }
#define check_list_invariants(l)
Definition: list.c:77
#define IsPointerList(l)
Definition: list.c:54
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169

◆ list_nth()