PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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

struct  List
 
struct  ListCell
 

Macros

#define NIL   ((List *) NULL)
 
#define lnext(lc)   ((lc)->next)
 
#define lfirst(lc)   ((lc)->data.ptr_value)
 
#define lfirst_int(lc)   ((lc)->data.int_value)
 
#define lfirst_oid(lc)   ((lc)->data.oid_value)
 
#define linitial(l)   lfirst(list_head(l))
 
#define linitial_int(l)   lfirst_int(list_head(l))
 
#define linitial_oid(l)   lfirst_oid(list_head(l))
 
#define lsecond(l)   lfirst(lnext(list_head(l)))
 
#define lsecond_int(l)   lfirst_int(lnext(list_head(l)))
 
#define lsecond_oid(l)   lfirst_oid(lnext(list_head(l)))
 
#define lthird(l)   lfirst(lnext(lnext(list_head(l))))
 
#define lthird_int(l)   lfirst_int(lnext(lnext(list_head(l))))
 
#define lthird_oid(l)   lfirst_oid(lnext(lnext(list_head(l))))
 
#define lfourth(l)   lfirst(lnext(lnext(lnext(list_head(l)))))
 
#define lfourth_int(l)   lfirst_int(lnext(lnext(lnext(list_head(l)))))
 
#define lfourth_oid(l)   lfirst_oid(lnext(lnext(lnext(list_head(l)))))
 
#define llast(l)   lfirst(list_tail(l))
 
#define llast_int(l)   lfirst_int(list_tail(l))
 
#define llast_oid(l)   lfirst_oid(list_tail(l))
 
#define list_make1(x1)   lcons(x1, NIL)
 
#define list_make2(x1, x2)   lcons(x1, list_make1(x2))
 
#define list_make3(x1, x2, x3)   lcons(x1, list_make2(x2, x3))
 
#define list_make4(x1, x2, x3, x4)   lcons(x1, list_make3(x2, x3, x4))
 
#define list_make5(x1, x2, x3, x4, x5)   lcons(x1, list_make4(x2, x3, x4, x5))
 
#define list_make1_int(x1)   lcons_int(x1, NIL)
 
#define list_make2_int(x1, x2)   lcons_int(x1, list_make1_int(x2))
 
#define list_make3_int(x1, x2, x3)   lcons_int(x1, list_make2_int(x2, x3))
 
#define list_make4_int(x1, x2, x3, x4)   lcons_int(x1, list_make3_int(x2, x3, x4))
 
#define list_make5_int(x1, x2, x3, x4, x5)   lcons_int(x1, list_make4_int(x2, x3, x4, x5))
 
#define list_make1_oid(x1)   lcons_oid(x1, NIL)
 
#define list_make2_oid(x1, x2)   lcons_oid(x1, list_make1_oid(x2))
 
#define list_make3_oid(x1, x2, x3)   lcons_oid(x1, list_make2_oid(x2, x3))
 
#define list_make4_oid(x1, x2, x3, x4)   lcons_oid(x1, list_make3_oid(x2, x3, x4))
 
#define list_make5_oid(x1, x2, x3, x4, x5)   lcons_oid(x1, list_make4_oid(x2, x3, x4, x5))
 
#define foreach(cell, l)   for ((cell) = list_head(l); (cell) != NULL; (cell) = lnext(cell))
 
#define for_each_cell(cell, initcell)   for ((cell) = (initcell); (cell) != NULL; (cell) = lnext(cell))
 
#define forboth(cell1, list1, cell2, list2)
 
#define forthree(cell1, list1, cell2, list2, cell3, list3)
 

Typedefs

typedef struct ListCell ListCell
 
typedef struct List List
 

Functions

static ListCelllist_head (const List *l)
 
static ListCelllist_tail (List *l)
 
static int list_length (const List *l)
 
Listlappend (List *list, void *datum)
 
Listlappend_int (List *list, int datum)
 
Listlappend_oid (List *list, Oid datum)
 
ListCelllappend_cell (List *list, ListCell *prev, void *datum)
 
ListCelllappend_cell_int (List *list, ListCell *prev, int datum)
 
ListCelllappend_cell_oid (List *list, ListCell *prev, Oid datum)
 
Listlcons (void *datum, List *list)
 
Listlcons_int (int datum, List *list)
 
Listlcons_oid (Oid datum, List *list)
 
Listlist_concat (List *list1, List *list2)
 
Listlist_truncate (List *list, int new_size)
 
ListCelllist_nth_cell (const List *list, int n)
 
void * list_nth (const List *list, int n)
 
int list_nth_int (const List *list, int n)
 
Oid list_nth_oid (const List *list, int n)
 
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)
 
Listlist_delete (List *list, void *datum)
 
Listlist_delete_ptr (List *list, void *datum)
 
Listlist_delete_int (List *list, int datum)
 
Listlist_delete_oid (List *list, Oid datum)
 
Listlist_delete_first (List *list)
 
Listlist_delete_cell (List *list, ListCell *cell, ListCell *prev)
 
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)
 
Listlist_append_unique (List *list, void *datum)
 
Listlist_append_unique_ptr (List *list, void *datum)
 
Listlist_append_unique_int (List *list, int datum)
 
Listlist_append_unique_oid (List *list, Oid datum)
 
Listlist_concat_unique (List *list1, List *list2)
 
Listlist_concat_unique_ptr (List *list1, List *list2)
 
Listlist_concat_unique_int (List *list1, List *list2)
 
Listlist_concat_unique_oid (List *list1, List *list2)
 
void list_free (List *list)
 
void list_free_deep (List *list)
 
Listlist_copy (const List *list)
 
Listlist_copy_tail (const List *list, int nskip)
 

Macro Definition Documentation

#define forboth (   cell1,
  list1,
  cell2,
  list2 
)
Value:
for ((cell1) = list_head(list1), (cell2) = list_head(list2); \
(cell1) != NULL && (cell2) != NULL; \
(cell1) = lnext(cell1), (cell2) = lnext(cell2))
static ListCell * list_head(const List *l)
Definition: pg_list.h:77
#define lnext(lc)
Definition: pg_list.h:105
#define NULL
Definition: c.h:226

Definition at line 174 of file pg_list.h.

Referenced by _equalList(), AddRoleMems(), adjust_paths_for_srfs(), apply_tlist_labeling(), assign_collations_walker(), ATPostAlterTypeCleanup(), compare_pathkeys(), create_groupingsets_plan(), create_index_paths(), create_indexscan_plan(), create_modifytable_plan(), deconstruct_indexquals(), DelRoleMems(), distinct_col_search(), equalRSDesc(), ExecEvalFieldStore(), ExecEvalRowCompare(), ExecEvalXml(), ExecInitIndexScan(), ExecScanSubPlan(), ExecSetParamPlan(), ExecWithCheckOptions(), expand_indexqual_conditions(), expandRecordVariable(), expandRelAttrs(), expandRTE(), extractRemainingColumns(), find_all_inheritors(), find_param_referent(), fix_indexorderby_references(), fix_indexqual_references(), flatten_join_alias_vars_mutator(), get_matching_location(), get_number_of_groups(), get_qual_for_range(), get_rule_expr(), get_simple_values_rte(), identify_join_columns(), make_row_comparison_op(), make_row_distinct_op(), reduce_outer_joins_pass2(), relation_has_unique_index_for(), RelationGetPartitionDispatchInfo(), rename_constraint_internal(), renameatt_internal(), rewriteValuesRTE(), set_append_rel_size(), set_deparse_for_query(), set_simple_column_names(), set_subqueryscan_references(), standard_planner(), tlist_same_exprs(), transformAggregateCall(), transformDistinctOnClause(), transformJoinUsingClause(), transformPartitionBound(), transformRangeTableSample(), transformSetOperationTree(), transformValuesClause(), trivial_subqueryscan(), and xmlelement().

#define foreach (   cell,
 
)    for ((cell) = list_head(l); (cell) != NULL; (cell) = lnext(cell))

Definition at line 155 of file pg_list.h.

#define forthree (   cell1,
  list1,
  cell2,
  list2,
  cell3,
  list3 
)
Value:
for ((cell1) = list_head(list1), (cell2) = list_head(list2), (cell3) = list_head(list3); \
(cell1) != NULL && (cell2) != NULL && (cell3) != NULL; \
(cell1) = lnext(cell1), (cell2) = lnext(cell2), (cell3) = lnext(cell3))
static ListCell * list_head(const List *l)
Definition: pg_list.h:77
#define lnext(lc)
Definition: pg_list.h:105
#define NULL
Definition: c.h:226

Definition at line 183 of file pg_list.h.

Referenced by addRangeTableEntryForFunction(), contain_leaked_vars_walker(), convert_EXISTS_to_ANY(), ExecInitExpr(), expandRTE(), generate_append_tlist(), generate_setop_tlist(), get_from_clause_coldeflist(), pg_import_system_collations(), set_plan_refs(), split_pathtarget_at_srfs(), and transformSetOperationStmt().

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

Definition at line 106 of file pg_list.h.

Referenced by _equalList(), _outList(), _SPI_execute_plan(), _SPI_make_plan_non_temp(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), _SPI_save_plan(), AcquireExecutorLocks(), AcquirePlannerLocks(), AcquireRewriteLocks(), add_base_rels_to_query(), add_child_rel_equivalences(), add_new_columns_to_pathtarget(), add_partial_path(), add_partial_path_precheck(), add_path(), add_path_precheck(), add_paths_to_joinrel(), add_paths_with_pathkeys_for_rel(), add_placeholders_to_base_rels(), add_placeholders_to_joinrel(), add_predicate_to_quals(), add_rtes_to_flat_rtable(), add_security_quals(), add_to_flat_tlist(), add_unique_group_var(), add_vars_to_targetlist(), add_with_check_options(), addArc(), addArcs(), addFamilyMember(), addKey(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), AddRelationNewConstraints(), AddRoleMems(), adjust_inherited_tlist(), adjust_paths_for_srfs(), adjust_rowcompare_for_index(), adjust_rowcount_for_semijoins(), adjust_view_column_set(), adjustJoinTreeList(), advance_windowaggregate(), advance_windowaggregate_base(), afterTriggerInvokeEvents(), AfterTriggerSetState(), AlterDatabase(), AlterDomainNotNull(), AlterFunction(), AlterOperator(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), AlterPublicationTables(), AlterRole(), AlterTableGetLockLevel(), AlterTableGetRelOptionsLockLevel(), AlterTSDictionary(), analyzeCTE(), analyzeCTETargetList(), appendAggOrderBy(), appendConditions(), appendGroupByClause(), appendOrderByClause(), appendTypeNameToBuffer(), apply_pathtarget_labeling_to_tlist(), apply_tlist_labeling(), ApplyExtensionUpdates(), ApplyLauncherMain(), approx_tuple_count(), arrayexpr_next_fn(), assign_aggregate_collations(), assign_collations_walker(), assign_hypothetical_collations(), assign_list_collations(), assign_ordered_set_collations(), assign_param_for_placeholdervar(), assign_param_for_var(), assign_record_type_typmod(), assignSortGroupRef(), AsyncExistsPendingNotify(), asyncQueueAddEntries(), ATAddCheckConstraint(), AtCommit_Notify(), ATController(), AtEOSubXact_on_commit_actions(), AtEOXact_on_commit_actions(), AtEOXact_Snapshot(), ATExecAttachPartition(), ATExecSetRelOptions(), ATGetQueueEntry(), ATPostAlterTypeCleanup(), ATPostAlterTypeParse(), ATRewriteCatalogs(), ATRewriteTable(), ATRewriteTables(), BeginCopy(), blvalidate(), bms_equal_any(), brinvalidate(), btcostestimate(), btvalidate(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_rel_hash(), build_joinrel_tlist(), build_path_tlist(), build_paths_for_OR(), build_pertrans_for_aggref(), build_physical_tlist(), build_simple_rel(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), BuildCachedPlan(), BuildDescForRelation(), BuildDescFromLists(), buildRelationAliases(), cached_plan_cost(), cached_scansel(), calc_joinrel_size_estimate(), ChangeVarNodes(), check_constant_qual(), check_datestyle(), check_db(), check_functional_grouping(), check_hba(), check_index_only(), check_index_predicates(), check_log_destination(), check_log_statement(), check_new_partition_bound(), 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(), checkRuleResultList(), checkSharedDependencies(), checkWellFormedRecursionWalker(), choose_bitmap_and(), ChooseConstraintName(), ChooseIndexColumnNames(), ChooseIndexNameAddition(), ChoosePortalStrategy(), classify_index_clause_usage(), classifyConditions(), clause_selectivity(), clauselist_selectivity(), CloseTableList(), cluster(), coerce_record_to_complex(), colname_is_unique(), colNameToVar(), compare_pathkeys(), compare_tlist_datatypes(), compute_attributes_sql_style(), compute_attributes_with_style(), compute_semi_anti_join_factors(), compute_semijoin_info(), ComputeIndexAttrs(), ComputePartitionAttrs(), consider_index_join_outer_rels(), consider_parallel_nestloop(), ConstructTupleDescriptor(), contain_leaked_vars_walker(), convert_EXISTS_to_ANY(), convert_requires_to_datum(), convert_subquery_pathkeys(), ConvertTriggerToFK(), CopyGetAttnums(), cost_bitmap_and_node(), cost_bitmap_or_node(), cost_qual_eval(), cost_tidscan(), cost_windowagg(), count_nonjunk_tlist_entries(), create_append_path(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_ctas_nodata(), create_ctescan_plan(), create_customscan_plan(), create_distinct_paths(), create_foreignscan_plan(), create_grouping_paths(), create_groupingsets_path(), create_groupingsets_plan(), create_index_paths(), create_indexscan_plan(), create_join_clause(), create_lateral_join_info(), create_merge_append_path(), create_merge_append_plan(), create_mergejoin_plan(), create_minmaxagg_path(), create_minmaxagg_plan(), create_modifytable_path(), create_modifytable_plan(), create_nestloop_path(), create_nestloop_plan(), create_one_window_path(), create_ordered_paths(), create_set_projection_path(), create_unique_plan(), create_window_paths(), createdb(), CreateEventTrigger(), CreateExtension(), CreateExtensionInternal(), CreateFunction(), CreateRole(), CreateSchemaCommand(), CreateTrigger(), dblink_fdw_validator(), deconstruct_indexquals(), deconstruct_recurse(), defGetStringList(), DefineAggregate(), DefineCollation(), DefineDomain(), DefineOpClass(), DefineOperator(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DefineType(), DefineView(), DefineVirtualRelation(), deflist_to_tuplestore(), DelRoleMems(), deparseAggref(), deparseAnalyzeSql(), deparseArrayExpr(), deparseArrayRef(), deparseBoolExpr(), deparseColumnRef(), deparseExplicitTargetList(), deparseFuncExpr(), deparseOpExpr(), deparseParam(), deparseRelation(), deparseVar(), determineRecursiveColTypes(), dintdict_init(), dispell_init(), do_analyze_rel(), do_start_worker(), DoCopy(), domain_check_input(), DropConfigurationMapping(), dropOperators(), dropProcedures(), DropRole(), 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(), errdetail_execute(), estimate_num_groups(), eval_const_expressions_mutator(), EvalOrderByExpressions(), EvalPlanQualEnd(), EvalPlanQualFetchRowMarks(), EvalPlanQualStart(), evaluate_function(), EvaluateParams(), EventTriggerCollectGrant(), EventTriggerCommonSetup(), examine_variable(), exec_check_rw_parameter(), exec_eval_using_params(), exec_simple_check_node(), exec_simple_query(), exec_stmt_block(), exec_stmt_case(), exec_stmt_execsql(), exec_stmt_getdiag(), exec_stmt_if(), exec_stmt_raise(), exec_stmts(), Exec_UnlistenCommit(), ExecAlterDefaultPrivilegesStmt(), ExecAlterExtensionStmt(), ExecBuildProjectionInfo(), ExecCheckPlanOutput(), ExecCheckRTPerms(), ExecCheckXactReadOnly(), ExecCleanTargetListLength(), execCurrentOf(), ExecEndPlan(), ExecEvalAnd(), ExecEvalArray(), ExecEvalArrayRef(), ExecEvalCase(), ExecEvalCoalesce(), ExecEvalCoerceToDomain(), ExecEvalFieldStore(), ExecEvalFuncArgs(), ExecEvalMinMax(), ExecEvalOr(), ExecEvalRow(), ExecEvalRowCompare(), ExecEvalWholeRowVar(), ExecEvalXml(), ExecFindJunkAttributeInTlist(), ExecFindRowMark(), ExecGetTriggerResultRel(), ExecGrant_Relation(), ExecHashGetHashValue(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapOr(), ExecInitExpr(), ExecInitFunctionScan(), ExecInitHashJoin(), ExecInitIndexScan(), ExecInitJunkFilter(), ExecInitJunkFilterConversion(), ExecInitLockRows(), ExecInitMergeAppend(), ExecInitModifyTable(), ExecInitNode(), ExecInitSubPlan(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecLockRows(), ExecMakeFunctionResultNoSets(), ExecNestLoop(), ExecPostprocessPlan(), ExecProjectSRF(), ExecQual(), ExecReScan(), ExecReScanFunctionScan(), ExecResetTupleTable(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSerializePlan(), ExecSetParamPlan(), ExecSetVariableStmt(), ExecSupportsBackwardScan(), ExecTargetList(), ExecTypeFromExprList(), ExecTypeFromTLInternal(), ExecTypeSetColNames(), execute_sql_string(), ExecuteDoStmt(), ExecuteGrantStmt(), ExecuteTruncate(), ExecWithCheckOptions(), expand_col_privileges(), expand_function_arguments(), expand_grouping_sets(), expand_groupingset_node(), expand_indexqual_conditions(), expand_inherited_tables(), expand_targetlist(), ExpandAllTables(), expandRecordVariable(), expandRelAttrs(), expandRTE(), ExpandSingleTable(), expandTupleDesc(), ExplainCustomChildren(), ExplainExecuteQuery(), ExplainNode(), ExplainPrintTriggers(), ExplainPropertyList(), ExplainPropertyListNested(), ExplainQuery(), ExplainResultDesc(), ExplainSubPlans(), expression_tree_mutator(), expression_tree_walker(), exprLocation(), exprs_known_equal(), exprTypmod(), extract_actual_clauses(), extract_actual_join_clauses(), extract_grouping_cols(), extract_grouping_ops(), extract_lateral_references(), extract_nonindex_conditions(), extract_or_clause(), extract_query_dependencies_walker(), extract_restriction_or_clauses(), extract_rollup_sets(), ExtractConnectionOptions(), ExtractExtensionList(), extractRemainingColumns(), fetch_upper_rel(), FigureColnameInternal(), file_fdw_validator(), fileGetOptions(), fill_hba_line(), fill_hba_view(), filter_list_to_array(), final_cost_hashjoin(), finalize_aggregate(), finalize_grouping_exprs_walker(), finalize_plan(), find_childrel_appendrelinfo(), find_duplicate_ors(), find_ec_member_for_tle(), 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_pathkeys(), find_minmax_aggs_walker(), find_nonnullable_rels_walker(), find_nonnullable_vars_walker(), find_param_referent(), find_placeholder_info(), find_placeholders_in_expr(), find_placeholders_recurse(), find_update_path(), findAttrByName(), findTargetlistEntrySQL92(), findTargetlistEntrySQL99(), findWindowClause(), fireRIRrules(), fireRules(), fix_append_rel_relids(), fix_indexorderby_references(), fix_indexqual_operand(), fix_indexqual_references(), fix_placeholder_input_needed_levels(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_grouping_sets(), flatten_join_alias_vars_mutator(), flatten_join_using_qual(), flatten_set_variable_args(), flush_pipe_input(), fmgr_sql(), fmgr_sql_validator(), 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(), freeScanStack(), func_get_detail(), funcname_signature_string(), 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_implied_equalities_for_column(), generate_join_implied_equalities_broken(), generate_join_implied_equalities_for_ecs(), generate_join_implied_equalities_normal(), generate_mergeappend_paths(), generate_relation_name(), generate_setop_grouplist(), generate_setop_tlist(), generate_subquery_params(), generate_subquery_vars(), generateClonedIndexStmt(), genericcostestimate(), get_actual_clauses(), get_actual_variable_range(), get_agg_expr(), get_altertable_subcmdtypes(), get_appendrel_parampathinfo(), get_available_versions_for_extension(), get_baserel_parampathinfo(), get_basic_select_query(), get_bitmap_tree_required_outer(), get_cheapest_fractional_path(), get_cheapest_fractional_path_for_pathkeys(), get_cheapest_parameterized_child_path(), get_cheapest_path_for_pathkeys(), get_column_info_for_window(), get_connect_string(), get_eclass_for_sort_expr(), 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_paths(), get_indexpath_pages(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_matching_location(), get_name_for_var_field(), get_nearest_unprocessed_vertex(), get_number_of_groups(), get_object_address_attribute(), get_object_address_opf_member(), get_object_address_type(), get_parse_rowmark(), get_plan_rowmark(), get_policies_for_relation(), get_qual_for_list(), get_qual_for_range(), get_rel_sync_entry(), get_relation_foreign_keys(), get_relids_in_jointree(), get_rels_with_domain(), get_required_extension(), get_rte_attribute_is_dropped(), get_rte_attribute_type(), 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_sublink_expr(), get_switched_clauses(), 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(), GetCommandLogLevel(), GetCTEForRTE(), GetExistingLocalJoinPath(), getTokenTypes(), gimme_tree(), gincostestimate(), ginvalidate(), gistbufferinginserttuples(), gistfinishsplit(), gistRelocateBuildBuffersOnSplit(), gistvalidate(), GrantRole(), grouping_is_hashable(), grouping_is_sortable(), grouping_planner(), has_dangerous_join_using(), has_indexed_join_quals(), has_join_restriction(), has_legal_joinclause(), has_relevant_eclass_joinclause(), has_unique_index(), hash_inner_and_outer(), hashvalidate(), have_dangerous_phv(), have_join_order_restriction(), have_relevant_eclass_joinclause(), have_relevant_joinclause(), heap_truncate(), heap_truncate_check_FKs(), identify_join_columns(), ImportForeignSchema(), indexcol_is_bool_constant_for_query(), infer_arbiter_indexes(), inheritance_planner(), init_execution_state(), init_params(), init_sql_fcache(), initialize_peragg(), InitPlan(), inline_function(), inline_set_returning_functions(), interpret_function_parameter_list(), interpretOidsOption(), intorel_startup(), is_partition_attr(), 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(), JumbleExpr(), JumbleRangeTable(), lappend(), lappend_cell(), lcons(), list_concat_unique(), list_concat_unique_ptr(), list_delete(), list_delete_ptr(), list_difference(), list_difference_ptr(), list_free_private(), list_intersection(), list_member(), list_member_ptr(), list_member_strip(), list_next_fn(), list_nth(), list_union(), list_union_ptr(), load_hba(), load_ident(), load_libraries(), LoadPublications(), LockTableCommand(), lookup_proof_cache(), LookupAggNameTypeNames(), LookupFuncNameTypeNames(), make_canonical_pathkey(), make_fn_arguments(), make_group_input_target(), make_inner_pathkeys_for_merge(), make_one_range_bound(), make_outerjoininfo(), make_partial_grouping_target(), 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_clauses_to_index(), match_eclasses_to_foreign_key_col(), match_foreign_keys_to_quals(), match_index_to_operand(), match_join_clauses_to_index(), match_pathkeys_to_index(), match_unsorted_outer(), MatchNamedCall(), merge_clump(), MergeAttributes(), MergeCheckConstraint(), MJExamineQuals(), NameListToQuotedString(), NameListToString(), negate_clause(), objectNamesToOids(), objectsInSchemaToOids(), OffsetVarNodes(), OpenTableList(), optionListToArray(), order_qual_clauses(), orderby_operands_eval_cost(), ordered_set_startup(), other_operands_eval_cost(), packGraph(), parse_basebackup_options(), parse_func_options(), parse_hba_line(), parse_ident_line(), parse_output_parameters(), parse_publication_options(), parse_subscription_options(), parse_tsquery(), parseCheckAggregates(), ParseFuncOrColumn(), pathkey_is_redundant(), pathkeys_useful_for_merging(), perform_base_backup(), pg_decode_startup(), pg_event_trigger_ddl_commands(), pg_extension_update_paths(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_import_system_collations(), pg_listening_channels(), pg_plan_queries(), plan_cluster_use_sort(), PlanCacheFuncCallback(), PlanCacheRelCallback(), planstate_tree_walker(), planstate_walk_subplans(), plpgsql_extra_checks_check_hook(), policy_role_list_to_array(), PortalGetPrimaryStmt(), PortalRunMulti(), postgres_fdw_validator(), postgresAcquireSampleRowsFunc(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresGetForeignRelSize(), postgresImportForeignSchema(), postgresIsForeignRelUpdatable(), postgresql_fdw_validator(), PostmasterMain(), postprocess_setop_tlist(), PreCommit_Notify(), PreCommit_on_commit_actions(), prep_domain_constraints(), prepare_query_params(), prepare_sort_from_pathkeys(), PrepareClientEncoding(), PrepareQuery(), PrepareTempTablespaces(), preprocess_groupclause(), preprocess_minmax_aggregates(), preprocess_qual_conditions(), preprocess_rowmarks(), preprocess_targetlist(), print_expr(), print_function_arguments(), print_pathkeys(), print_rt(), print_tl(), printSubscripts(), ProcedureCreate(), process_duplicate_ors(), process_equivalence(), process_owned_by(), process_pipe_input(), process_query_params(), process_security_barrier_quals(), process_startup_options(), process_sublinks_mutator(), process_subquery_nestloop_params(), ProcessCopyOptions(), ProcessUtilitySlow(), prsd_headline(), PublicationAddTables(), PublicationDropTables(), publicationListToArray(), 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_cleanup(), pull_up_subqueries_recurse(), push_ancestor_plan(), qual_is_pushdown_safe(), query_is_distinct_for(), QueryListGetPrimaryStmt(), QueryRewrite(), range_table_mutator(), range_table_walker(), raw_expression_tree_walker(), rebuild_database_list(), recheck_cast_function_args(), recomputeNamespacePath(), reconsider_full_join_clause(), reconsider_outer_join_clause(), reconsider_outer_join_clauses(), reduce_outer_joins_pass1(), reduce_outer_joins_pass2(), rel_is_distinct_for(), rel_supports_distinctness(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationCacheInvalidate(), RelationGetPartitionDispatchInfo(), ReleaseSavepoint(), remap_groupColIdx(), RememberFsyncRequest(), remove_on_commit_action(), remove_rel_from_joinlist(), remove_rel_from_query(), remove_unused_subquery_outputs(), remove_useless_groupby_columns(), remove_useless_joins(), RemoveInheritance(), RemoveObjects(), RemoveRelations(), RemoveSocketFiles(), reorder_function_arguments(), reorder_grouping_sets(), replace_nestloop_params_mutator(), replace_vars_in_jointree(), rescanLatestTimeLine(), ResetPlanCache(), resolve_unique_index_expr(), resolveTargetListUnknowns(), restriction_is_constant_false(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), rewriteTargetView(), rewriteValuesRTE(), right_merge_direction(), roleSpecsToIds(), RollbackToSavepoint(), RTERangeTablePosn(), scalararraysel(), scanNameSpaceForCTE(), scanNameSpaceForRefname(), scanNameSpaceForRelid(), ScanQueryForLocks(), scanRTEForColumn(), search_indexed_tlist_for_sortgroupref(), SearchCatCacheList(), searchForDefault(), searchRangeTableForCol(), searchRangeTableForRel(), select_active_windows(), select_common_type(), select_mergejoin_clauses(), select_outer_pathkeys_for_merge(), selectColorTrigrams(), SendBackupHeader(), sendDir(), SendRowDescriptionMessage(), sepgsql_avc_lookup(), sepgsql_avc_reclaim(), sepgsql_dml_privileges(), sepgsql_subxact_callback(), sepgsql_utility_command(), serialize_deflist(), set_append_rel_pathlist(), set_append_rel_size(), set_base_rel_consider_startup(), 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_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_subquery_size_estimates(), set_subqueryscan_references(), set_upper_references(), set_using_names(), SetClientEncoding(), SetDefaultACLsInSchemas(), setNamespaceColumnVisibility(), setNamespaceLateralState(), setRuleCheckAsUser_Query(), setup_simple_rel_arrays(), show_grouping_set_keys(), show_grouping_sets(), show_plan_tlist(), show_tablesample(), ShutdownSQLFunction(), sort_inner_and_outer(), sort_policies_by_name(), spgvalidate(), SPI_cursor_open_internal(), 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(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), StartupXLOG(), 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(), thesaurus_init(), TidListCreate(), TidQualFromBaseRestrictinfo(), TidQualFromExpr(), tliInHistory(), tliOfPointInHistory(), tlist_matches_coltypelist(), tlist_matches_tupdesc(), tlist_member(), tlist_member_ignore_relabel(), tlist_member_match_var(), tlist_same_collations(), tlist_same_datatypes(), tlist_same_exprs(), tliSwitchPoint(), tokenize_inc_file(), TouchSocketFiles(), TouchSocketLockFiles(), transformAExprIn(), transformAExprOf(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformArraySubscripts(), transformAssignmentIndirection(), transformBoolExpr(), transformCaseExpr(), transformCheckConstraints(), transformCoalesceExpr(), transformColumnDefinition(), 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(), transformPartitionSpec(), transformRangeFunction(), transformRangeTableSample(), transformRelOptions(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSortClause(), transformSubLink(), transformTargetList(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), translate_col_privs(), translate_sub_tlist(), trivial_subqueryscan(), type_in_list_does_not_exist_skipping(), TypeNameListToString(), typenameTypeMod(), unaccent_init(), unify_hypothetical_args(), UnlinkLockFiles(), update_placeholder_eval_levels(), update_proconfig_value(), UpdateLogicalMappings(), use_physical_tlist(), validate_ddl_tags(), validate_table_rewrite_tags(), validateDomainConstraint(), ValuesNext(), view_cols_are_auto_updatable(), view_query_is_auto_updatable(), WaitForLockersMultiple(), XLogFileReadAnyTLI(), xmlconcat(), and xmlelement().

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

Definition at line 107 of file pg_list.h.

Referenced by _equalList(), _outList(), adjust_paths_for_srfs(), analyzeCTE(), ATRewriteTable(), BeginCopy(), build_subplan(), BuildDescFromLists(), buildSubPlanHash(), convert_prep_stmt_params(), CopyOneRowTo(), CopyTo(), deconstruct_indexquals(), deparseDirectUpdateSql(), deparseInsertSql(), deparseUpdateSql(), distinct_col_search(), DoCopy(), ExecEvalFieldStore(), ExecEvalGroupingFuncExpr(), ExecInitSubPlan(), ExecReScanSetParamPlan(), ExecScanSubPlan(), ExecSetParamPlan(), expand_indexqual_conditions(), expandRTE(), extract_rollup_sets(), finalize_plan(), finalize_primnode(), find_all_inheritors(), find_compatible_pertrans(), find_param_referent(), fix_expr_common(), fix_indexorderby_references(), fix_indexqual_references(), get_from_clause_coldeflist(), get_matching_location(), get_rule_groupingset(), grouping_planner(), InitPlan(), JumbleExpr(), lappend_cell_int(), lappend_int(), lcons_int(), list_concat_unique_int(), list_delete_int(), list_difference_int(), list_intersection_int(), list_member_int(), list_nth_int(), list_union_int(), make_modifytable(), make_tuple_from_result_row(), NextCopyFrom(), pg_import_system_collations(), postgresBeginForeignModify(), prepare_projection_slot(), preprocess_groupclause(), rename_constraint_internal(), renameatt_internal(), reorder_grouping_sets(), rewriteValuesRTE(), set_plan_refs(), show_grouping_set_keys(), SS_identify_outer_params(), SyncRepGetNthLatestSyncRecPtr(), SyncRepGetOldestSyncRecPtr(), SyncRepGetSyncStandbysPriority(), transformDistinctOnClause(), transformInsertRow(), and transformSetOperationStmt().

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

Definition at line 108 of file pg_list.h.

Referenced by _equalList(), _outList(), acquire_inherited_sample_rows(), AddRoleMems(), adjust_rowcompare_for_index(), AfterTriggerSetState(), AlterIndexNamespaces(), AlterPublicationOptions(), AlterPublicationTables(), AlterTableMoveAll(), analyzeCTE(), ApplyExtensionUpdates(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropNotNull(), ATExecSetTableSpace(), ATExecValidateConstraint(), ATPostAlterTypeCleanup(), ATPrepAlterColumnType(), ATSimpleRecursion(), ATTypedTableRecursion(), BuildDescFromLists(), calculate_indexes_size(), calculate_toast_table_size(), check_functions_in_node(), cluster(), CollationGetCollid(), CommuteRowCompareExpr(), compare_tlist_datatypes(), contain_leaked_vars_walker(), ConversionGetConid(), convert_EXISTS_to_ANY(), cost_qual_eval_walker(), create_unique_plan(), CreateFunction(), current_schemas(), database_to_xml_internal(), database_to_xmlschema_internal(), DelRoleMems(), 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(), ExecInitExpr(), ExecInitIndexScan(), ExecOpenIndices(), ExecRefreshMatView(), ExecSetupPartitionTupleRouting(), execute_extension_script(), ExecuteTruncate(), expand_inherited_rtentry(), expandRTE(), 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_relation_info(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), GetRelationPublicationActions(), heap_truncate(), heap_truncate_check_FKs(), infer_arbiter_indexes(), insert_ordered_oid(), insert_ordered_unique_oid(), InsertExtensionTuple(), is_admin_of_role(), lappend_cell_oid(), lappend_oid(), lcons_oid(), list_concat_unique_oid(), list_delete_oid(), list_difference_oid(), list_member_oid(), list_nth_oid(), 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(), OpclassnameGetOpcid(), OpenTableList(), OpernameGetCandidates(), OpernameGetOprid(), OpfamilynameGetOpfid(), OverrideSearchPathMatchesCurrent(), pg_get_publication_tables(), ReassignOwnedObjects(), refresh_by_match_merge(), reindex_relation(), ReindexMultipleTables(), relation_has_unique_index_for(), relation_mark_replica_identity(), RelationBuildPartitionDesc(), RelationGetIndexAttrBitmap(), RelationGetPartitionDispatchInfo(), relationHasPrimaryKey(), RelationHasUnloggedIndex(), RelationIsVisible(), RelationTruncateIndexes(), RelnameGetRelid(), rename_constraint_internal(), renameatt_internal(), roles_has_privs_of(), roles_is_member_of(), schema_to_xml_internal(), schema_to_xmlschema_internal(), select_best_grantor(), select_equality_operator(), sepgsql_dml_privileges(), shdepDropOwned(), shdepReassignOwned(), show_modifytable_info(), StoreCatalogInheritance(), tlist_matches_coltypelist(), tlist_same_collations(), tlist_same_datatypes(), toast_open_indexes(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformRangeTableSample(), transformSetOperationStmt(), transformTableLikeClause(), triggered_change_notification(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), typeInheritsFrom(), TypeIsVisible(), TypenameGetTypid(), vac_open_indexes(), and vacuum().

#define lfourth (   l)    lfirst(lnext(lnext(lnext(list_head(l)))))

Definition at line 122 of file pg_list.h.

Referenced by LookupTypeName(), and transformColumnRef().

#define lfourth_int (   l)    lfirst_int(lnext(lnext(lnext(list_head(l)))))

Definition at line 123 of file pg_list.h.

#define lfourth_oid (   l)    lfirst_oid(lnext(lnext(lnext(list_head(l)))))

Definition at line 124 of file pg_list.h.

#define linitial (   l)    lfirst(list_head(l))

Definition at line 110 of file pg_list.h.

Referenced by add_security_quals(), add_with_check_options(), addRangeTableEntryForFunction(), addRangeTableEntryForValues(), AddRelationNewConstraints(), adjust_rowcompare_for_index(), AlterExtensionNamespace(), AlterOperator(), AlterOpFamilyAdd(), ApplyRetrieveRule(), assign_collations_walker(), AtEOSubXact_Namespace(), AtEOXact_Namespace(), ATExecAddConstraint(), ATExecAttachPartition(), AtSubAbort_Notify(), AtSubCommit_Notify(), BeginCopy(), bernoulli_samplescangetsamplesize(), build_subplan(), check_hashjoinable(), check_mergejoinable(), check_object_ownership(), check_sql_fn_retval(), choose_bitmap_and(), ChoosePortalStrategy(), clauselist_selectivity(), CommentObject(), CommuteOpExpr(), compute_semijoin_info(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), ConvertTriggerToFK(), cost_qual_eval_walker(), create_bitmap_subplan(), create_grouping_paths(), create_groupingsets_path(), create_groupingsets_plan(), create_hashjoin_plan(), CreateCommandTag(), CreateExtensionInternal(), currtid_for_view(), deconstruct_indexquals(), deconstruct_recurse(), DeconstructQualifiedName(), DefineAggregate(), DefineOpClass(), DefineQueryRewrite(), deparseBoolExpr(), deparseDistinctExpr(), deparseFuncExpr(), deparseScalarArrayOpExpr(), does_not_exist_skipping(), estimate_num_groups(), eval_const_expressions_mutator(), exec_parse_message(), exec_simple_check_plan(), exec_simple_recheck_plan(), ExecAlterOwnerStmt(), ExecCreateTableAs(), ExecEvalNot(), ExecEvalXml(), ExecIndexBuildScanKeys(), ExecInitAlternativeSubPlan(), ExecInitHashJoin(), ExecInitModifyTable(), ExecInitSubPlan(), ExecInitValuesScan(), ExecRefreshMatView(), ExecSecLabelStmt(), ExecSetVariableStmt(), ExecuteQuery(), expand_grouping_sets(), ExpandColumnRefStar(), ExplainOneUtility(), ExplainTargetRel(), exprCollation(), exprSetCollation(), exprType(), exprTypmod(), extract_not_arg(), extract_strong_not_arg(), FigureColnameInternal(), FillPortalStore(), find_duplicate_ors(), find_minmax_aggs_walker(), find_param_referent(), findTargetlistEntrySQL92(), fix_indexorderby_references(), fix_indexqual_references(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_join_using_qual(), FreeExecutorState(), func_get_detail(), generate_base_implied_equalities_const(), generate_gather_paths(), generate_join_implied_equalities_normal(), get_agg_clause_costs_walker(), get_agg_expr(), get_first_col_type(), get_from_clause_item(), get_func_expr(), get_join_variables(), get_leftop(), get_notclausearg(), get_object_address(), get_object_address_defacl(), get_object_address_opcf(), get_object_address_publication_rel(), get_object_address_unqualified(), get_object_address_usermapping(), get_oper_expr(), get_qual_for_list(), get_restriction_variable(), get_rtable_name(), get_rule_expr(), get_simple_binary_op_name(), get_sublink_expr(), get_update_query_targetlist_def(), get_useful_pathkeys_for_relation(), get_view_query(), getInsertSelectQuery(), gimme_tree(), gistEmptyAllBuffers(), gistFindPath(), gistfinishsplit(), gistProcessEmptyingQueue(), grouping_planner(), hash_inner_and_outer(), hash_ok_operator(), initial_cost_mergejoin(), inline_function(), inline_set_returning_function(), InsertRule(), interpret_AS_clause(), interval_transform(), is_dummy_plan(), is_safe_append_member(), is_simple_values(), isSimpleNode(), IsTidEqualAnyClause(), IsTidEqualClause(), IsTransactionExitStmtList(), IsTransactionStmtList(), LookupTypeName(), make_ands_explicit(), make_rel_from_joinlist(), make_row_comparison_op(), make_ruledef(), make_unique_from_pathkeys(), make_viewdef(), makeRangeVarFromNameList(), makeWholeRowVar(), match_clause_to_indexcol(), match_rowcompare_to_indexcol(), mdpostckpt(), MJExamineQuals(), negate_clause(), numeric_transform(), operator_precedence_group(), operator_predicate_proof(), ordered_set_startup(), parse_hba_line(), parse_ident_line(), parseCheckAggregates(), ParseFuncOrColumn(), PerformCursorOpen(), PlanCacheComputeResultDesc(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), PLy_abort_open_subtransactions(), PLy_subtransaction_exit(), PopOverrideSearchPath(), PortalStart(), predicate_implied_by(), predicate_refuted_by(), prepare_sort_from_pathkeys(), preprocess_minmax_aggregates(), preprocess_rowmarks(), process_duplicate_ors(), process_owned_by(), processIndirection(), processState(), processTypesSpec(), pull_up_simple_values(), pull_up_sublinks_qual_recurse(), query_is_distinct_for(), reconsider_full_join_clause(), reduce_outer_joins_pass2(), refresh_matview_datafill(), regnamespacein(), regrolein(), relation_excluded_by_constraints(), relation_is_updatable(), replace_domain_constraint_value(), resolve_column_ref(), ResolveOpClass(), RewriteQuery(), rewriteTargetView(), rewriteValuesRTE(), rowcomparesel(), scalararraysel(), select_active_windows(), select_common_type(), set_append_rel_pathlist(), set_deparse_context_planstate(), set_plan_refs(), simplify_and_arguments(), simplify_boolean_equality(), simplify_or_arguments(), spgWalk(), SPI_cursor_open_internal(), SPI_is_cursor_plan(), SPI_plan_get_cached_plan(), sql_fn_post_column_ref(), standard_join_search(), standard_qp_callback(), strip_implicit_coercions(), system_rows_samplescangetsamplesize(), system_samplescangetsamplesize(), system_time_samplescangetsamplesize(), TemporalTransform(), TidListCreate(), to_regnamespace(), to_regrole(), transformAExprBetween(), transformAExprIn(), transformAExprNullIf(), transformAExprOf(), transformAExprOp(), transformAssignedExpr(), transformColumnDefinition(), transformColumnRef(), transformDeclareCursorStmt(), transformGraph(), transformIndexConstraint(), transformInsertRow(), transformJoinUsingClause(), transformPartitionBound(), transformRangeFunction(), transformReturningList(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformValuesClause(), transformXmlExpr(), TypeGetTupleDesc(), typenameTypeMod(), typeStringToTypeName(), varbit_transform(), varchar_transform(), view_cols_are_auto_updatable(), and view_query_is_auto_updatable().

#define list_make1 (   x1)    lcons(x1, NIL)

Definition at line 133 of file pg_list.h.

Referenced by add_dummy_return(), add_predicate_to_quals(), ATAddCheckConstraint(), ATExecAddColumn(), ATExecAttachPartition(), ATExecColumnDefault(), build_aggregate_finalfn_expr(), build_aggregate_serialfn_expr(), build_aggregate_transfn_expr(), build_coercion_expression(), build_expression_pathkey(), build_minmax_path(), BuildEventTriggerCache(), check_index_predicates(), choose_bitmap_and(), convert_combining_aggrefs(), ConvertTriggerToFK(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_estate_for_relation(), create_indexscan_plan(), create_tidscan_plan(), CreateRole(), deconstruct_recurse(), defGetQualifiedName(), defGetTypeName(), DefineViewRules(), DefineVirtualRelation(), deparse_context_for(), deparse_context_for_plan_rtable(), DoCopy(), eval_const_expressions_mutator(), ExecAlterObjectDependsStmt(), ExecInitSubPlan(), ExecSetVariableStmt(), expand_groupingset_node(), expand_indexqual_opclause(), ExplainNode(), extract_rollup_sets(), fileGetForeignPaths(), find_forced_null_vars(), find_nonnullable_vars_walker(), flatten_simple_union_all(), foreign_grouping_ok(), FunctionIsVisible(), generate_bitmap_or_paths(), generate_function_name(), generate_operator_name(), get_call_expr_arg_stable(), get_call_expr_argtype(), get_qual_for_list(), get_useful_pathkeys_for_relation(), getObjectIdentityParts(), gincostestimate(), gistFindPath(), grouping_planner(), inline_function(), intorel_startup(), make_ands_implicit(), make_notclause(), make_op(), make_opclause(), make_ruledef(), makeSimpleA_Expr(), makeTypeName(), map_sql_table_to_xmlschema(), network_prefix_quals(), OperatorIsVisible(), PerformCursorOpen(), pg_get_object_address(), pg_get_triggerdef_worker(), pg_rewrite_query(), plan_cluster_use_sort(), prefix_quals(), process_duplicate_ors(), process_equivalence(), pull_up_sublinks(), pull_up_subqueries_cleanup(), readTimeLineHistory(), recordDependencyOnExpr(), recordDependencyOnSingleRelExpr(), recurse_union_children(), regoperout(), regprocout(), RelationGetPartitionDispatchInfo(), resolve_unique_index_expr(), selectColorTrigrams(), split_pathtarget_at_srfs(), sql_fn_post_column_ref(), standard_ProcessUtility(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), TidQualFromExpr(), transformAExprDistinct(), transformAExprIn(), transformAssignmentIndirection(), transformColumnDefinition(), transformColumnRef(), transformCurrentOfExpr(), transformFromClauseItem(), transformGroupClause(), transformIndexConstraints(), transformIndirection(), transformRangeFunction(), transformRuleStmt(), transformSubLink(), transformValuesClause(), transformXmlSerialize(), and WaitForLockers().

#define list_make2_int (   x1,
  x2 
)    lcons_int(x1, list_make1_int(x2))

Definition at line 140 of file pg_list.h.

#define list_make2_oid (   x1,
  x2 
)    lcons_oid(x1, list_make1_oid(x2))

Definition at line 146 of file pg_list.h.

#define list_make3_int (   x1,
  x2,
  x3 
)    lcons_int(x1, list_make2_int(x2, x3))

Definition at line 141 of file pg_list.h.

#define list_make3_oid (   x1,
  x2,
  x3 
)    lcons_oid(x1, list_make2_oid(x2, x3))

Definition at line 147 of file pg_list.h.

#define list_make4 (   x1,
  x2,
  x3,
  x4 
)    lcons(x1, list_make3(x2, x3, x4))
#define list_make4_int (   x1,
  x2,
  x3,
  x4 
)    lcons_int(x1, list_make3_int(x2, x3, x4))

Definition at line 142 of file pg_list.h.

#define list_make4_oid (   x1,
  x2,
  x3,
  x4 
)    lcons_oid(x1, list_make3_oid(x2, x3, x4))

Definition at line 148 of file pg_list.h.

#define list_make5 (   x1,
  x2,
  x3,
  x4,
  x5 
)    lcons(x1, list_make4(x2, x3, x4, x5))

Definition at line 137 of file pg_list.h.

#define list_make5_int (   x1,
  x2,
  x3,
  x4,
  x5 
)    lcons_int(x1, list_make4_int(x2, x3, x4, x5))

Definition at line 143 of file pg_list.h.

#define list_make5_oid (   x1,
  x2,
  x3,
  x4,
  x5 
)    lcons_oid(x1, list_make4_oid(x2, x3, x4, x5))

Definition at line 149 of file pg_list.h.

#define llast_int (   l)    lfirst_int(list_tail(l))

Definition at line 127 of file pg_list.h.

#define llast_oid (   l)    lfirst_oid(list_tail(l))

Definition at line 128 of file pg_list.h.

#define lnext (   lc)    ((lc)->next)

Definition at line 105 of file pg_list.h.

Referenced by _copyList(), _outList(), add_partial_path(), add_path(), add_unique_group_var(), addKey(), adjust_rowcompare_for_index(), AlterTSDictionary(), analyzeCTE(), arrayexpr_next_fn(), assign_hypothetical_collations(), asyncQueueAddEntries(), ATAddForeignKeyConstraint(), AtEOSubXact_on_commit_actions(), AtEOXact_on_commit_actions(), build_index_tlist(), build_subplan(), BuildDescFromLists(), buildRelationAliases(), choose_bitmap_and(), coerce_record_to_complex(), compare_tlist_datatypes(), ComputeIndexAttrs(), ConstructTupleDescriptor(), convert_EXISTS_to_ANY(), create_ctas_nodata(), create_groupingsets_path(), create_groupingsets_plan(), create_mergejoin_plan(), create_nestloop_plan(), create_one_window_path(), DefineView(), deparseAggref(), deparseArrayRef(), deparseFuncExpr(), determineRecursiveColTypes(), do_analyze_rel(), estimate_num_groups(), examine_variable(), exec_simple_query(), exec_stmt_raise(), ExecIndexBuildScanKeys(), ExecInitJunkFilterConversion(), ExecLockRows(), ExecSecLabelStmt(), expand_grouping_sets(), expand_inherited_tables(), expand_targetlist(), expandRTE(), expandTupleDesc(), ExplainExecuteQuery(), ExplainQuery(), exprTypmod(), extract_rollup_sets(), fix_indexqual_operand(), fmgr_sql(), FormIndexDatum(), FormPartitionKeyDatum(), funcname_signature_string(), generate_append_tlist(), generate_setop_grouplist(), generate_setop_tlist(), generateClonedIndexStmt(), get_foreign_key_join_selectivity(), get_from_clause_coldeflist(), get_func_expr(), get_qual_for_list(), get_qual_for_range(), get_rule_expr(), get_update_query_targetlist_def(), insert_ordered_oid(), insert_ordered_unique_oid(), intorel_startup(), is_partition_attr(), join_search_one_level(), list_delete_cell(), list_free_private(), list_next_fn(), LookupFuncNameTypeNames(), make_inner_pathkeys_for_merge(), match_index_to_operand(), merge_clump(), MergeAttributes(), OverrideSearchPathMatchesCurrent(), parse_hba_line(), parse_ident_line(), parseCheckAggregates(), ParseFuncOrColumn(), perform_base_backup(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_publication_tables(), pg_listening_channels(), PortalRunMulti(), postprocess_setop_tlist(), print_expr(), print_function_arguments(), print_pathkeys(), printSubscripts(), ProcedureCreate(), process_startup_options(), ProcessUtilitySlow(), pull_up_subqueries_recurse(), push_ancestor_plan(), query_is_distinct_for(), reconsider_outer_join_clauses(), RememberFsyncRequest(), remove_rel_from_query(), RemoveObjects(), select_active_windows(), select_common_type(), SendRowDescriptionMessage(), sepgsql_avc_reclaim(), sepgsql_subxact_callback(), serialize_deflist(), SetClientEncoding(), split_pathtarget_at_srfs(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), SyncRepGetSyncStandbysPriority(), tlist_matches_coltypelist(), tlist_matches_tupdesc(), tlist_same_collations(), tlist_same_datatypes(), transformAssignmentIndirection(), transformInsertRow(), transformSetOperationStmt(), transformUpdateTargetList(), and transformWithClause().

#define lsecond (   l)    lfirst(lnext(list_head(l)))

Definition at line 114 of file pg_list.h.

Referenced by AlterOperator(), AlterOpFamilyAdd(), arrayconst_startup_fn(), arrayexpr_next_fn(), arrayexpr_startup_fn(), clauselist_selectivity(), CommuteOpExpr(), compute_semijoin_info(), convert_EXISTS_to_ANY(), ConvertTriggerToFK(), cost_qual_eval_walker(), cost_tidscan(), deconstruct_indexquals(), DeconstructQualifiedName(), DefineAggregate(), DefineOpClass(), deparseDistinctExpr(), deparseScalarArrayOpExpr(), ExecEvalXml(), ExecIndexBuildScanKeys(), ExecInitAlternativeSubPlan(), ExecInitHashJoin(), ExecInitSubPlan(), ExpandColumnRefStar(), exprIsLengthCoercion(), flatten_join_using_qual(), genericcostestimate(), get_join_variables(), get_object_address(), get_object_address_defacl(), get_oper_expr(), get_restriction_variable(), get_rightop(), get_rule_expr(), get_simple_binary_op_name(), get_sublink_expr(), gistfinishsplit(), interpret_AS_clause(), interval_transform(), is_strict_saop(), IsTidEqualAnyClause(), IsTidEqualClause(), LookupTypeName(), make_row_comparison_op(), makeRangeVarFromNameList(), match_clause_to_indexcol(), MJExamineQuals(), numeric_transform(), operator_predicate_proof(), 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(), TemporalTransform(), TidListCreate(), transformAExprBetween(), transformColumnRef(), transformIndexConstraint(), transformRangeFunction(), varbit_transform(), and varchar_transform().

#define lsecond_int (   l)    lfirst_int(lnext(list_head(l)))

Definition at line 115 of file pg_list.h.

#define lsecond_oid (   l)    lfirst_oid(lnext(list_head(l)))

Definition at line 116 of file pg_list.h.

#define lthird_int (   l)    lfirst_int(lnext(lnext(list_head(l))))

Definition at line 119 of file pg_list.h.

#define lthird_oid (   l)    lfirst_oid(lnext(lnext(list_head(l))))

Definition at line 120 of file pg_list.h.

#define NIL   ((List *) NULL)

Definition at line 69 of file pg_list.h.

Referenced by _copyRestrictInfo(), _SPI_execute_plan(), _SPI_make_plan_non_temp(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), _SPI_save_plan(), AcquireRewriteLocks(), add_dummy_return(), add_foreign_grouping_paths(), add_path(), add_path_precheck(), add_paths_to_joinrel(), add_paths_with_pathkeys_for_rel(), add_predicate_to_quals(), add_rte_to_flat_rtable(), add_security_quals(), add_with_check_options(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addTargetToSortList(), adjust_appendrel_attrs_mutator(), adjust_inherited_tlist(), adjust_rowcompare_for_index(), AfterTriggerSetState(), AlterDomainDefault(), AlterFunction(), AlterOperator(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), AlterPolicy(), AlterPublicationTables(), AlterRole(), AlterSubscription(), AlterTableGetRelOptionsLockLevel(), AlterTableMoveAll(), AlterTSDictionary(), analyzeCTETargetList(), appendTypeNameToBuffer(), apply_handle_delete(), apply_handle_update(), ApplyExtensionUpdates(), approx_tuple_count(), assign_aggregate_collations(), assign_collations_walker(), assign_record_type_typmod(), Async_Unlisten(), Async_UnlistenAll(), AsyncExistsPendingNotify(), asyncQueueUnregister(), AtAbort_Notify(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtCommit_Notify(), ATController(), AtEOSubXact_cleanup(), AtEOXact_cleanup(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAlterColumnGenericOptions(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecColumnDefault(), ATExecDropConstraint(), ATExecGenericOptions(), ATExecReplicaIdentity(), ATExecSetRelOptions(), ATExecSetTableSpace(), ATExecValidateConstraint(), ATPostAlterTypeParse(), ATPrepAlterColumnType(), ATRewriteCatalogs(), ATRewriteTable(), ATRewriteTables(), AtSubStart_Notify(), autovacuum_do_vac_analyze(), BeginCopy(), binary_upgrade_create_empty_extension(), bitmap_and_cost_est(), bitmap_scan_cost_est(), btcostestimate(), btvalidate(), build_base_rel_tlists(), build_empty_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_minmax_path(), build_path_tlist(), build_paths_for_OR(), build_pertrans_for_aggref(), build_physical_tlist(), build_simple_rel(), build_subplan(), build_tlist_to_deparse(), BuildCachedPlan(), BuildIndexInfo(), buildRelationAliases(), CachedPlanGetTargetList(), calc_joinrel_size_estimate(), CatalogIndexInsert(), check_agglevels_and_constraints(), check_equivalence_delay(), check_index_predicates(), check_outerjoin_delay(), check_selective_binary_conversion(), check_sql_fn_retval(), CheckAttributeNamesTypes(), CheckIndexCompatible(), checkInsertTargets(), CheckSelectLocking(), checkSharedDependencies(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), choose_bitmap_and(), choose_hashed_setop(), ChooseIndexColumnNames(), ChooseIndexName(), ChoosePortalStrategy(), classify_index_clause_usage(), classifyConditions(), ClearPendingActionsAndNotifies(), coerce_record_to_complex(), CommandIsReadOnly(), CommuteRowCompareExpr(), compile_plperl_function(), compute_attributes_sql_style(), compute_index_stats(), compute_return_type(), compute_semi_anti_join_factors(), compute_semijoin_info(), consider_index_join_clauses(), consider_new_or_clause(), ConstructTupleDescriptor(), convert_ANY_sublink_to_join(), convert_combining_aggrefs(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_prep_stmt_params(), convert_subquery_pathkeys(), ConvertTriggerToFK(), CopyFrom(), CopyFromInsertBatch(), CopyGetAttnums(), 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_distinct_paths(), create_gather_path(), create_gather_plan(), 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_merge_append_plan(), create_mergejoin_plan(), create_minmaxagg_path(), create_minmaxagg_plan(), create_modifytable_path(), create_modifytable_plan(), create_nestloop_path(), create_nestloop_plan(), create_ordered_paths(), create_plan(), create_recursiveunion_path(), create_result_path(), create_samplescan_path(), create_scan_plan(), create_seqscan_path(), create_setop_path(), create_tidscan_path(), create_toast_table(), create_unique_path(), create_unique_plan(), create_valuesscan_path(), create_worktablescan_path(), CreateCachedPlan(), CreateCommandTag(), CreateExecutorState(), CreateExtension(), CreateExtensionInternal(), CreateFKCheckTrigger(), createForeignKeyTriggers(), CreateFunction(), CreateInitDecodingContext(), CreateLockFile(), CreateOneShotCachedPlan(), CreateProceduralLanguage(), CreateReplicationSlot(), CreateRole(), CreateTrigger(), current_schema(), database_to_xmlschema_internal(), dccref_deletion_callback(), deconstruct_indexquals(), deconstruct_jointree(), deconstruct_recurse(), defGetQualifiedName(), DefineAggregate(), DefineCompositeType(), DefineDomain(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineSequence(), DefineTSDictionary(), DefineType(), DefineView(), DefineVirtualRelation(), deparse_context_for(), deparse_context_for_plan_rtable(), deparse_expression_pretty(), deparseAggref(), deparseAnalyzeSql(), deparseArrayExpr(), deparseExplicitTargetList(), deparseFromExpr(), deparseReturningList(), deparseTargetList(), deserialize_deflist(), determineRecursiveColTypes(), DiscardAll(), do_analyze_rel(), do_autovacuum(), DoCopy(), domainAddConstraint(), dump_dynexecute(), dump_dynfors(), dump_if(), dump_open(), dump_return_query(), estimate_expression_value(), estimate_num_groups(), estimate_path_cost_size(), eval_const_expressions(), eval_const_expressions_mutator(), EvalPlanQualStart(), EventTriggerAlterTableStart(), EventTriggerBeginCompleteQuery(), EventTriggerCollectGrant(), EventTriggerCommonSetup(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), EventTriggerTableRewrite(), examine_variable(), exec_execute_message(), exec_parse_message(), exec_simple_check_plan(), exec_stmt_raise(), exec_stmts(), Exec_UnlistenAllCommit(), ExecAlterDefaultPrivilegesStmt(), ExecARDeleteTriggers(), ExecASDeleteTriggers(), ExecASInsertTriggers(), ExecASTruncateTriggers(), ExecASUpdateTriggers(), ExecBuildProjectionInfo(), ExecCheckIndexConstraints(), ExecEvalArrayRef(), ExecEvalXml(), ExecHashJoin(), ExecHashSubPlan(), ExecInitAgg(), ExecInitCustomScan(), ExecInitExpr(), ExecInitForeignScan(), ExecInitHash(), ExecInitHashJoin(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitNode(), ExecInitProjectSet(), ExecInitRecursiveUnion(), ExecInitSubPlan(), ExecInitWindowAgg(), ExecInsert(), ExecInsertIndexTuples(), ExecMergeJoin(), ExecNestLoop(), ExecOnConflictUpdate(), ExecRefreshMatView(), ExecReScanSetParamPlan(), ExecSecLabelStmt(), ExecSerializePlan(), ExecSetParamPlan(), ExecSimpleRelationDelete(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), ExecSubPlan(), ExecUpdate(), ExecuteGrantStmt(), ExecuteTruncate(), ExecVacuum(), expand_grouping_sets(), expand_groupingset_node(), expand_indexqual_conditions(), expand_inherited_rtentry(), expand_targetlist(), ExpandAllTables(), expandRelAttrs(), ExpandRowReference(), expandRTE(), ExplainNode(), ExplainPrintPlan(), ExplainPrintTriggers(), ExplainQuery(), expression_tree_mutator(), exprTypmod(), extract_actual_clauses(), extract_actual_join_clauses(), extract_lateral_references(), extract_nonindex_conditions(), extract_or_clause(), extract_query_dependencies(), extract_rollup_sets(), ExtractExtensionList(), extractRemainingColumns(), fetch_upper_rel(), FetchPortalTargetList(), FetchStatementTargetList(), 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_peragg(), find_duplicate_ors(), find_forced_null_vars(), find_hash_columns(), find_inheritance_children(), find_install_path(), find_mergeclauses_for_pathkeys(), find_minmax_aggs_walker(), find_nonnullable_vars_walker(), find_param_referent(), find_typed_table_dependencies(), find_update_path(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), fireRIRrules(), fireRules(), 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(), freeScanStack(), func_get_detail(), FuncnameGetCandidates(), FunctionIsVisible(), generate_append_tlist(), generate_bitmap_or_paths(), generate_function_name(), 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_mergeappend_paths(), generate_mergejoin_paths(), generate_nonunion_path(), generate_partition_qual(), generate_recursion_path(), generate_setop_tlist(), generate_subquery_params(), generate_subquery_vars(), generateClonedIndexStmt(), GenerateTypeDependencies(), get_actual_clauses(), get_actual_variable_range(), get_agg_clause_costs_walker(), get_agg_expr(), get_appendrel_parampathinfo(), get_available_versions_for_extension(), get_baserel_parampathinfo(), get_basic_select_query(), get_cheapest_parameterized_child_path(), get_collation(), get_column_info_for_window(), 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_paths(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_leftop(), get_mergejoin_opfamilies(), get_name_for_var_field(), get_op_btree_interpretation(), get_opclass(), get_policies_for_relation(), get_qual_for_range(), get_qual_from_partbound(), get_query_def(), get_rel_oids(), get_relation_constraints(), get_relation_info(), get_rels_with_domain(), get_row_security_policies(), get_rule_expr(), get_select_query_def(), get_sortgrouplist_exprs(), get_subscription_list(), get_switched_clauses(), 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(), GetCachedPlan(), GetForeignColumnOptions(), GetForeignDataWrapper(), GetForeignServer(), GetForeignTable(), getObjectIdentityParts(), getOwnedSequences(), GetPublicationRelations(), GetRelationPublications(), getRelationsInNamespace(), getState(), GetUserMapping(), gimme_tree(), gincostestimate(), gistEmptyAllBuffers(), gistFindPath(), gistfinishsplit(), gistfixsplit(), gistGetNodeBuffer(), gistInitBuildBuffers(), gistplacetopage(), gistProcessEmptyingQueue(), GrantRole(), grouping_planner(), has_indexed_join_quals(), has_unique_index(), has_useful_pathkeys(), hash_inner_and_outer(), hashvalidate(), heap_truncate(), heap_truncate_check_FKs(), heap_truncate_find_FKs(), identify_join_columns(), identify_opfamily_groups(), identify_update_path(), index_check_primary_key(), index_constraint_create(), index_register(), IndexBuildHeapRangeScan(), IndexCheckExclusion(), infer_arbiter_indexes(), inheritance_planner(), init_execution_state(), init_params(), init_sql_fcache(), InitDomainConstraintRef(), initialize_mergeclause_eclasses(), InitPlan(), InitResultRelInfo(), inline_set_returning_function(), inline_set_returning_functions(), insert_event_trigger_tuple(), insert_ordered_oid(), insert_ordered_unique_oid(), InsertRule(), interpret_AS_clause(), interpret_function_parameter_list(), intorel_startup(), is_shippable(), is_simple_subquery(), is_strict_saop(), isLockedRefname(), IsThereFunctionInNamespace(), join_is_removable(), join_search_one_level(), label_sort_with_costsize(), lappend(), lappend_int(), lappend_oid(), lcons(), lcons_int(), lcons_oid(), list_concat(), list_copy(), list_copy_tail(), list_delete_cell(), list_delete_first(), list_difference(), list_difference_int(), list_difference_oid(), list_difference_ptr(), list_intersection(), list_intersection_int(), list_nth_cell(), list_truncate(), load_domaintype_info(), load_hba(), load_ident(), load_relcache_init_file(), LoadPublications(), lookup_agg_function(), lookup_index_am_handler_func(), lookup_proof_cache(), lookup_ts_dictionary_cache(), LookupAggNameTypeNames(), LookupFuncName(), LookupTypeName(), make_ands_explicit(), make_ands_implicit(), make_append(), make_bitmap_and(), make_bitmap_indexscan(), make_bitmap_or(), make_group_input_target(), make_hash(), make_inh_translation_list(), make_inner_pathkeys_for_merge(), make_join_rel(), make_limit(), make_lockrows(), make_material(), make_modifytable(), make_new_heap(), make_partial_grouping_target(), 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(), makeRangeConstructors(), makeTypeNameFromNameList(), map_partition_varattnos(), map_sql_typecoll_to_xmlschema_types(), mark_dummy_rel(), match_eclasses_to_foreign_key_col(), match_foreign_keys_to_quals(), match_pathkeys_to_index(), matchLocks(), MatchNamedCall(), materialize_finished_plan(), mdinit(), mdpostckpt(), merge_clump(), MergeAttributes(), minmax_qp_callback(), negate_clause(), network_prefix_quals(), next_field_expand(), nodeRead(), objectNamesToOids(), objectsInSchemaToOids(), oid_array_to_list(), OpenTableList(), operator_precedence_group(), order_qual_clauses(), parse_hba_line(), parse_ident_line(), parse_subscription_options(), parse_tsquery(), parseCheckAggregates(), ParseFuncOrColumn(), pathkeys_useful_for_merging(), pathkeys_useful_for_ordering(), perform_base_backup(), PerformCursorOpen(), pg_create_logical_replication_slot(), pg_extension_update_paths(), pg_get_constraintdef_worker(), pg_get_expr_worker(), pg_get_function_arg_default(), pg_get_indexdef_worker(), pg_get_object_address(), pg_get_partkeydef_worker(), pg_get_triggerdef_worker(), pg_import_system_collations(), pg_logical_slot_get_changes_guts(), pg_plan_queries(), pgoutput_startup(), pgstat_db_requested(), pgstat_write_statsfile_needed(), pgstat_write_statsfiles(), plan_cluster_use_sort(), plan_set_operations(), 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(), PortalDefineQuery(), PortalReleaseCachedPlan(), postgresGetForeignJoinPaths(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresGetForeignRelSize(), postgresImportForeignSchema(), postgresPlanDirectModify(), postgresPlanForeignModify(), PostmasterMain(), PreCommit_Notify(), PreCommit_on_commit_actions(), predicate_implied_by(), predicate_refuted_by(), prefix_quals(), prep_domain_constraints(), preprocess_groupclause(), preprocess_minmax_aggregates(), preprocess_rowmarks(), print_function_arguments(), ProcedureCreate(), process_duplicate_ors(), process_equivalence(), process_sublinks_mutator(), ProcessCompletedNotifies(), ProcessCopyOptions(), ProcessIncomingNotify(), ProcessStartupPacket(), processState(), processTypesSpec(), ProcessUtilitySlow(), pull_ands(), pull_ors(), pull_up_simple_subquery(), pull_up_simple_values(), pull_up_sublinks_jointree_recurse(), pull_up_sublinks_qual_recurse(), pull_up_subqueries_cleanup(), pull_var_clause(), pull_vars_of_level(), push_ancestor_plan(), PushOverrideSearchPath(), query_planner(), query_supports_distinctness(), query_to_oid_list(), QueryRewrite(), range_table_mutator(), raw_parser(), readTimeLineHistory(), RebuildConstraintComment(), recomputeNamespacePath(), recurse_set_operations(), reduce_outer_joins(), reduce_outer_joins_pass1(), reduce_outer_joins_pass2(), refresh_by_match_merge(), regprocedurein(), regprocin(), regprocout(), reindex_relation(), ReindexMultipleTables(), rel_is_distinct_for(), rel_supports_distinctness(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationBuildDesc(), RelationBuildPartitionDesc(), RelationCacheInvalidate(), RelationGetFKeyList(), RelationGetIndexAttrBitmap(), RelationGetIndexExpressions(), RelationGetIndexList(), RelationGetIndexPredicate(), RelationGetPartitionDispatchInfo(), RelationGetPartitionQual(), RelationInitIndexAccessInfo(), remove_rel_from_joinlist(), remove_useless_groupby_columns(), RemoveInheritance(), RemoveObjects(), RemoveRoleFromObjectACL(), RemoveRoleFromObjectPolicy(), RemoveSocketFiles(), rename_constraint_internal(), renameatt_internal(), reorder_function_arguments(), reorder_grouping_sets(), ResetReindexPending(), resolve_unique_index_expr(), ResolveOpClass(), 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(), set_append_rel_pathlist(), set_append_rel_size(), set_cheapest(), set_customscan_references(), set_deparse_for_query(), set_deparse_planstate(), set_dummy_rel_pathlist(), set_dummy_tlist_references(), set_foreignscan_references(), set_function_pathlist(), set_plan_refs(), set_relation_column_names(), set_rtable_names(), set_simple_column_names(), set_subquery_pathlist(), set_upper_references(), SetDefaultACLsInSchemas(), SetForwardFsyncRequests(), show_grouping_set_keys(), show_modifytable_info(), show_plan_tlist(), show_qual(), show_sort_group_keys(), show_tablesample(), simplify_and_arguments(), simplify_EXISTS_query(), simplify_or_arguments(), sort_policies_by_name(), spgWalk(), SPI_cursor_open_internal(), split_pathtarget_at_srfs(), split_pathtarget_walker(), SplitDirectoriesString(), SplitIdentifierString(), SS_charge_for_initplans(), SS_process_ctes(), standard_ExecutorStart(), standard_join_search(), standard_planner(), standard_qp_callback(), StartupXLOG(), StoreAttrDefault(), StoreCatalogInheritance(), StoreConstraints(), stringToQualifiedNameList(), subquery_planner(), SyncRepGetSyncStandbys(), SyncRepGetSyncStandbysPriority(), SyncRepGetSyncStandbysQuorum(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), textarray_to_stringlist(), textarray_to_strvaluelist(), textToQualifiedNameList(), TidQualFromBaseRestrictinfo(), TidQualFromExpr(), to_regproc(), to_regprocedure(), toast_open_indexes(), tokenize_file(), transformAExprBetween(), transformAExprIn(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformArraySubscripts(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformBoolExpr(), 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(), transformPartitionSpec(), transformRangeFunction(), transformRangeTableSample(), transformRelOptions(), transformReturningList(), transformRowExpr(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSortClause(), transformSubLink(), transformTableLikeClause(), transformTargetList(), transformUpdateTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), translate_sub_tlist(), TriggerEnabled(), trivial_subqueryscan(), truncate_useless_pathkeys(), try_hashjoin_path(), try_mergejoin_path(), try_partial_hashjoin_path(), TryReuseForeignKey(), ts_headline_byid_opt(), TypeGetTupleDesc(), typeInheritsFrom(), typenameTypeMod(), typeStringToTypeName(), unique_key_recheck(), UnlinkLockFiles(), untransformRelOptions(), update_mergeclause_eclasses(), UpdateDomainConstraintRef(), UpdateIndexRelation(), UpdateLogicalMappings(), UpdateRangeTableOfViewParse(), validate_index_heapscan(), ValuesNext(), view_query_is_auto_updatable(), WaitForLockersMultiple(), XactHasExportedSnapshots(), and xmlelement().

Typedef Documentation

typedef struct List List

Definition at line 43 of file pg_list.h.

Function Documentation

List* lappend ( List list,
void *  datum 
)

Definition at line 128 of file list.c.

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

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_placeholders_to_base_rels(), add_placeholders_to_joinrel(), 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(), addFamilyMember(), addKey(), addKeyToQueue(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addRTEtoQuery(), addTargetToGroupList(), addTargetToSortList(), adjust_inherited_tlist(), AlterPublicationTables(), AlterTableMoveAll(), AlterTSDictionary(), analyzeCTETargetList(), applyLockingClause(), ApplyRetrieveRule(), assign_param_for_placeholdervar(), assign_param_for_var(), Async_Notify(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAlterColumnType(), ATExecAttachPartition(), ATGetQueueEntry(), ATPostAlterTypeParse(), ATPrepAlterColumnType(), ATPrepCmd(), btcostestimate(), build_aggregate_finalfn_expr(), build_aggregate_transfn_expr(), build_coercion_expression(), build_empty_join_rel(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_rel(), build_joinrel_tlist(), build_path_tlist(), build_physical_tlist(), build_subplan(), BuildEventTriggerCache(), buildRelationAliases(), cached_scansel(), calc_joinrel_size_estimate(), check_index_predicates(), check_selective_binary_conversion(), check_sql_fn_retval(), checkInsertTargets(), checkSharedDependencies(), checkWellFormedRecursionWalker(), choose_bitmap_and(), ChooseIndexColumnNames(), classifyConditions(), coerce_record_to_complex(), compute_common_attribute(), compute_semi_anti_join_factors(), compute_semijoin_info(), ComputeIndexAttrs(), ComputePartitionAttrs(), consider_new_or_clause(), convert_ANY_sublink_to_join(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), ConvertTriggerToFK(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_ctas_nodata(), create_customscan_plan(), create_grouping_paths(), create_groupingsets_plan(), create_index_paths(), create_indexscan_plan(), create_join_clause(), create_merge_append_plan(), create_modifytable_plan(), create_nestloop_path(), create_nestloop_plan(), create_unique_plan(), database_to_xmlschema_internal(), deconstruct_indexquals(), deconstruct_recurse(), DefineRelation(), DefineSequence(), DefineTSDictionary(), DefineView(), DefineVirtualRelation(), deparseParam(), deparseVar(), deserialize_deflist(), determineRecursiveColTypes(), distribute_qual_to_rels(), distribute_restrictinfo_to_rels(), do_pg_start_backup(), DoCopy(), eval_const_expressions_mutator(), EvalPlanQualStart(), EventTriggerAlterTableEnd(), EventTriggerCollectAlterDefPrivs(), EventTriggerCollectAlterOpFam(), EventTriggerCollectAlterTableSubcmd(), EventTriggerCollectAlterTSConfig(), EventTriggerCollectCreateOpClass(), EventTriggerCollectGrant(), EventTriggerCollectSimpleCommand(), Exec_ListenCommit(), ExecAllocTableSlot(), ExecBuildProjectionInfo(), ExecEvalXml(), ExecGetTriggerResultRel(), ExecInitAgg(), ExecInitExpr(), ExecInitHashJoin(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitNode(), ExecInitSubPlan(), ExecuteGrantStmt(), ExecuteTruncate(), expand_grouping_sets(), expand_groupingset_node(), expand_indexqual_conditions(), expand_inherited_rtentry(), expand_targetlist(), expandRelAttrs(), ExpandRowReference(), expandRTE(), expandTupleDesc(), ExplainNode(), ExportSnapshot(), expression_tree_mutator(), extract_actual_clauses(), extract_actual_join_clauses(), extract_lateral_references(), extract_nonindex_conditions(), extract_or_clause(), extract_rollup_sets(), extractRemainingColumns(), fetch_upper_rel(), file_fdw_validator(), fill_hba_line(), find_duplicate_ors(), find_hash_columns(), find_list_position(), find_mergeclauses_for_pathkeys(), find_minmax_aggs_walker(), 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_join_using_qual(), flatten_simple_union_all(), foreign_grouping_ok(), foreign_join_ok(), format_operator_parts(), format_procedure_parts(), func_get_detail(), generate_append_tlist(), generate_bitmap_or_paths(), generate_implied_equalities_for_column(), generate_join_implied_equalities_broken(), generate_join_implied_equalities_normal(), generate_setop_tlist(), generate_subquery_params(), generate_subquery_vars(), generateClonedIndexStmt(), get_actual_clauses(), get_appendrel_parampathinfo(), get_baserel_parampathinfo(), get_column_info_for_window(), 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_paths(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_op_btree_interpretation(), get_policies_for_relation(), get_qual_for_range(), get_relation_constraints(), get_relation_foreign_keys(), get_required_extension(), get_sortgrouplist_exprs(), get_subscription_list(), get_switched_clauses(), get_tlist_exprs(), get_update_query_targetlist_def(), get_useful_ecs_for_relation(), get_useful_pathkeys_for_relation(), get_windowfunc_expr(), getObjectIdentityParts(), getState(), gistFindPath(), gistfixsplit(), gistplacetopage(), hash_inner_and_outer(), heap_truncate(), identify_opfamily_groups(), index_check_primary_key(), infer_arbiter_indexes(), inheritance_planner(), init_execution_state(), init_sql_fcache(), InitPlan(), interpret_function_parameter_list(), intorel_startup(), join_is_removable(), 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(), load_hba(), load_ident(), LoadPublications(), make_canonical_pathkey(), make_group_input_target(), make_inh_translation_list(), make_inner_pathkeys_for_merge(), make_modifytable(), make_partial_grouping_target(), 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_foreign_keys_to_quals(), match_join_clauses_to_index(), match_pathkeys_to_index(), matchLocks(), merge_clump(), MergeAttributes(), negate_clause(), network_prefix_quals(), next_field_expand(), nodeRead(), OpenTableList(), order_qual_clauses(), parse_hba_line(), parseCheckAggregates(), ParseFuncOrColumn(), perform_base_backup(), pg_get_object_address(), pg_import_system_collations(), pg_logical_slot_get_changes_guts(), pg_plan_queries(), postgresAddForeignUpdateTargets(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresImportForeignSchema(), prefix_quals(), prep_domain_constraints(), prepare_sort_from_pathkeys(), preprocess_groupclause(), 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_subqueries_cleanup(), pull_up_union_leaf_queries(), pull_var_clause_walker(), pull_vars_walker(), push_ancestor_plan(), QueryRewrite(), queue_listen(), range_table_mutator(), read_tablespace_map(), RebuildConstraintComment(), record_plan_function_dependency(), reduce_outer_joins_pass1(), register_label_provider(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationBuildPartitionDesc(), RelationCacheInvalidate(), RelationGetFKeyList(), RelationGetPartitionDispatchInfo(), RememberFsyncRequest(), remove_rel_from_joinlist(), remove_useless_groupby_columns(), RemoveInheritance(), reorder_function_arguments(), replace_nestloop_params_mutator(), replace_outer_agg(), replace_outer_grouping(), resetSpGistScanOpaque(), resolve_unique_index_expr(), RewriteQuery(), rewriteTargetListIU(), rewriteTargetListUD(), rewriteTargetView(), rewriteValuesRTE(), schema_to_xmlschema_internal(), SearchCatCacheList(), select_active_windows(), select_mergejoin_clauses(), select_outer_pathkeys_for_merge(), sepgsql_set_client_label(), set_append_rel_pathlist(), set_append_rel_size(), set_cheapest(), set_deparse_for_query(), set_dummy_tlist_references(), set_plan_references(), set_plan_refs(), set_rtable_names(), set_simple_column_names(), set_subquery_pathlist(), set_upper_references(), set_using_names(), show_grouping_set_keys(), show_modifytable_info(), show_plan_tlist(), show_sort_group_keys(), show_tablesample(), simplify_and_arguments(), simplify_or_arguments(), sort_policies_by_name(), split_pathtarget_at_srfs(), split_pathtarget_walker(), SplitDirectoriesString(), SplitIdentifierString(), SS_make_initplan_from_plan(), SS_process_ctes(), StandbyAcquireAccessExclusiveLock(), stringToQualifiedNameList(), subquery_planner(), textarray_to_stringlist(), textarray_to_strvaluelist(), textToQualifiedNameList(), tokenize_file(), tokenize_inc_file(), transformAExprIn(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformArraySubscripts(), transformAssignmentIndirection(), transformBoolExpr(), 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(), transformOnConflictClause(), transformPartitionBound(), transformPartitionSpec(), transformRangeFunction(), transformRangeTableSample(), transformRowExpr(), transformRuleStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), untransformRelOptions(), UpdateLogicalMappings(), WaitForLockersMultiple(), and xmlelement().

129 {
130  Assert(IsPointerList(list));
131 
132  if (list == NIL)
133  list = new_list(T_List);
134  else
135  new_tail_cell(list);
136 
137  lfirst(list->tail) = datum;
138  check_list_invariants(list);
139  return list;
140 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
static void new_tail_cell(List *list)
Definition: list.c:108
#define IsPointerList(l)
Definition: list.c:25
Definition: nodes.h:295
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
tuple list
Definition: sort-test.py:11
ListCell * tail
Definition: pg_list.h:50
ListCell* lappend_cell ( List list,
ListCell prev,
void *  datum 
)

Definition at line 209 of file list.c.

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

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

210 {
211  ListCell *new_cell;
212 
213  Assert(IsPointerList(list));
214 
215  new_cell = add_new_cell(list, prev);
216  lfirst(new_cell) = datum;
217  check_list_invariants(list);
218  return new_cell;
219 }
static ListCell * add_new_cell(List *list, ListCell *prev_cell)
Definition: list.c:185
#define check_list_invariants(l)
Definition: list.c:54
#define IsPointerList(l)
Definition: list.c:25
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
ListCell* lappend_cell_int ( List list,
ListCell prev,
int  datum 
)

Definition at line 222 of file list.c.

References add_new_cell(), Assert, check_list_invariants, IsIntegerList, and lfirst_int.

223 {
224  ListCell *new_cell;
225 
226  Assert(IsIntegerList(list));
227 
228  new_cell = add_new_cell(list, prev);
229  lfirst_int(new_cell) = datum;
230  check_list_invariants(list);
231  return new_cell;
232 }
static ListCell * add_new_cell(List *list, ListCell *prev_cell)
Definition: list.c:185
#define check_list_invariants(l)
Definition: list.c:54
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
#define Assert(condition)
Definition: c.h:671
ListCell* lappend_cell_oid ( List list,
ListCell prev,
Oid  datum 
)

Definition at line 235 of file list.c.

References add_new_cell(), Assert, check_list_invariants, IsOidList, and lfirst_oid.

Referenced by insert_ordered_oid(), and insert_ordered_unique_oid().

236 {
237  ListCell *new_cell;
238 
239  Assert(IsOidList(list));
240 
241  new_cell = add_new_cell(list, prev);
242  lfirst_oid(new_cell) = datum;
243  check_list_invariants(list);
244  return new_cell;
245 }
static ListCell * add_new_cell(List *list, ListCell *prev_cell)
Definition: list.c:185
#define check_list_invariants(l)
Definition: list.c:54
#define IsOidList(l)
Definition: list.c:27
#define Assert(condition)
Definition: c.h:671
#define lfirst_oid(lc)
Definition: pg_list.h:108
List* lappend_int ( List list,
int  datum 
)

Definition at line 146 of file list.c.

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

Referenced by addRangeTableEntryForFunction(), adjust_rowcompare_for_index(), analyzeCTETargetList(), ATRewriteTable(), build_index_paths(), build_subplan(), check_ungrouped_columns_walker(), checkInsertTargets(), convert_EXISTS_to_ANY(), CopyGetAttnums(), deparseAnalyzeSql(), deparseExplicitTargetList(), deparseTargetList(), expand_indexqual_conditions(), finalize_grouping_exprs_walker(), find_all_inheritors(), find_compatible_peragg(), fix_expr_common(), generate_subquery_params(), inheritance_planner(), list_append_unique_int(), list_concat_unique_int(), list_difference_int(), list_intersection_int(), list_union_int(), match_pathkeys_to_index(), nodeRead(), pg_import_system_collations(), postgresPlanDirectModify(), postgresPlanForeignModify(), rel_is_distinct_for(), reorder_grouping_sets(), rewriteTargetListIU(), split_pathtarget_at_srfs(), SS_process_ctes(), SyncRepGetSyncStandbysPriority(), SyncRepGetSyncStandbysQuorum(), transformDistinctOnClause(), transformGroupClauseList(), transformSetOperationTree(), transformValuesClause(), and translate_sub_tlist().

147 {
148  Assert(IsIntegerList(list));
149 
150  if (list == NIL)
151  list = new_list(T_IntList);
152  else
153  new_tail_cell(list);
154 
155  lfirst_int(list->tail) = datum;
156  check_list_invariants(list);
157  return list;
158 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
static void new_tail_cell(List *list)
Definition: list.c:108
#define Assert(condition)
Definition: c.h:671
tuple list
Definition: sort-test.py:11
ListCell * tail
Definition: pg_list.h:50
List* lappend_oid ( List list,
Oid  datum 
)

Definition at line 164 of file list.c.

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

Referenced by add_rte_to_flat_rtable(), addRangeTableEntryForFunction(), adjust_rowcompare_for_index(), AfterTriggerSetState(), AlterTableMoveAll(), analyzeCTETargetList(), ApplyExtensionUpdates(), assign_collations_walker(), ATExecAlterColumnType(), binary_upgrade_create_empty_extension(), check_functional_grouping(), CommuteRowCompareExpr(), compute_semijoin_info(), convert_EXISTS_to_ANY(), create_indexscan_plan(), CreateExtensionInternal(), CreateFunction(), do_autovacuum(), EventTriggerCommonSetup(), ExecAlterDefaultPrivilegesStmt(), ExecInitHashJoin(), ExecInsertIndexTuples(), ExecuteGrantStmt(), ExecuteTruncate(), extract_query_dependencies_walker(), ExtractExtensionList(), find_all_inheritors(), find_inheritance_children(), find_typed_table_dependencies(), fix_expr_common(), get_mergejoin_opfamilies(), get_rel_oids(), GetAllTablesPublicationRelations(), GetAllTablesPublications(), getOwnedSequences(), GetPublicationRelations(), GetRelationPublications(), getRelationsInNamespace(), heap_truncate_check_FKs(), infer_arbiter_indexes(), list_append_unique_oid(), list_concat_unique_oid(), list_difference_oid(), list_union_oid(), make_row_comparison_op(), MergeAttributes(), nodeRead(), objectNamesToOids(), objectsInSchemaToOids(), oid_array_to_list(), OpenTableList(), pgstat_recv_inquiry(), PreCommit_on_commit_actions(), query_to_oid_list(), recomputeNamespacePath(), reindex_relation(), ReindexMultipleTables(), rel_is_distinct_for(), RelationBuildPartitionDesc(), RelationGetPartitionDispatchInfo(), remove_useless_groupby_columns(), roleSpecsToIds(), transformAggregateCall(), transformSetOperationTree(), transformValuesClause(), and typeInheritsFrom().

165 {
166  Assert(IsOidList(list));
167 
168  if (list == NIL)
169  list = new_list(T_OidList);
170  else
171  new_tail_cell(list);
172 
173  lfirst_oid(list->tail) = datum;
174  check_list_invariants(list);
175  return list;
176 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
static void new_tail_cell(List *list)
Definition: list.c:108
#define IsOidList(l)
Definition: list.c:27
#define Assert(condition)
Definition: c.h:671
tuple list
Definition: sort-test.py:11
#define lfirst_oid(lc)
Definition: pg_list.h:108
ListCell * tail
Definition: pg_list.h:50
List* lcons ( void *  datum,
List list 
)

Definition at line 259 of file list.c.

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

Referenced by add_partial_path(), add_path(), assign_record_type_typmod(), ATExecAlterColumnType(), AtSubStart_Notify(), build_minmax_path(), checkWellFormedRecursionWalker(), CreateExprContext(), CreateLockFile(), estimate_num_groups(), ExecInitExpr(), ExecInitModifyTable(), ExplainNode(), extract_rollup_sets(), find_expr_references_walker(), find_update_path(), get_join_index_paths(), get_name_for_var_field(), get_object_address_rv(), get_query_def(), get_relation_info(), get_rels_with_domain(), get_tables_to_cluster(), gistEmptyAllBuffers(), gistFindPath(), gistfinishsplit(), gistGetNodeBuffer(), gistPushItupToNodeBuffer(), grouping_planner(), load_domaintype_info(), makeDependencyGraphWalker(), merge_clump(), parseCheckAggregates(), PLy_subtransaction_enter(), PrepareClientEncoding(), push_child_plan(), pushOperator(), PushOverrideSearchPath(), pushStop(), pushValue_internal(), readTimeLineHistory(), register_on_commit_action(), RelationBuildRowSecurity(), RelationCacheInvalidate(), reorder_grouping_sets(), RewriteQuery(), rewriteTargetView(), sepgsql_avc_compute(), set_cheapest(), show_agg_keys(), show_group_keys(), sort_inner_and_outer(), spgWalk(), transformCaseExpr(), transformCreateStmt(), and UpdateRangeTableOfViewParse().

260 {
261  Assert(IsPointerList(list));
262 
263  if (list == NIL)
264  list = new_list(T_List);
265  else
266  new_head_cell(list);
267 
268  lfirst(list->head) = datum;
269  check_list_invariants(list);
270  return list;
271 }
#define NIL
Definition: pg_list.h:69
static void new_head_cell(List *list)
Definition: list.c:89
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
#define IsPointerList(l)
Definition: list.c:25
Definition: nodes.h:295
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
tuple list
Definition: sort-test.py:11
ListCell * head
Definition: pg_list.h:49
List* lcons_int ( int  datum,
List list 
)

Definition at line 277 of file list.c.

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

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

278 {
279  Assert(IsIntegerList(list));
280 
281  if (list == NIL)
282  list = new_list(T_IntList);
283  else
284  new_head_cell(list);
285 
286  lfirst_int(list->head) = datum;
287  check_list_invariants(list);
288  return list;
289 }
#define NIL
Definition: pg_list.h:69
static void new_head_cell(List *list)
Definition: list.c:89
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
#define Assert(condition)
Definition: c.h:671
tuple list
Definition: sort-test.py:11
ListCell * head
Definition: pg_list.h:49
List* lcons_oid ( Oid  datum,
List list 
)

Definition at line 295 of file list.c.

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

Referenced by ATExecAlterColumnType(), CheckAttributeType(), CreateSchemaCommand(), fireRIRrules(), inline_function(), insert_ordered_oid(), insert_ordered_unique_oid(), PushOverrideSearchPath(), recomputeNamespacePath(), ReindexMultipleTables(), and TryReuseForeignKey().

296 {
297  Assert(IsOidList(list));
298 
299  if (list == NIL)
300  list = new_list(T_OidList);
301  else
302  new_head_cell(list);
303 
304  lfirst_oid(list->head) = datum;
305  check_list_invariants(list);
306  return list;
307 }
#define NIL
Definition: pg_list.h:69
static void new_head_cell(List *list)
Definition: list.c:89
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
#define IsOidList(l)
Definition: list.c:27
#define Assert(condition)
Definition: c.h:671
tuple list
Definition: sort-test.py:11
ListCell * head
Definition: pg_list.h:49
#define lfirst_oid(lc)
Definition: pg_list.h:108
List* list_append_unique ( List list,
void *  datum 
)

Definition at line 962 of file list.c.

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

Referenced by add_security_quals(), and add_with_check_options().

963 {
964  if (list_member(list, datum))
965  return list;
966  else
967  return lappend(list, datum);
968 }
bool list_member(const List *list, const void *datum)
Definition: list.c:444
List * lappend(List *list, void *datum)
Definition: list.c:128
tuple list
Definition: sort-test.py:11
List* list_append_unique_int ( List list,
int  datum 
)

Definition at line 987 of file list.c.

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

988 {
989  if (list_member_int(list, datum))
990  return list;
991  else
992  return lappend_int(list, datum);
993 }
bool list_member_int(const List *list, int datum)
Definition: list.c:485
List * lappend_int(List *list, int datum)
Definition: list.c:146
tuple list
Definition: sort-test.py:11
List* list_append_unique_oid ( List list,
Oid  datum 
)

Definition at line 999 of file list.c.

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

Referenced by ATExecAlterConstraint(), btvalidate(), hashvalidate(), is_admin_of_role(), map_sql_typecoll_to_xmlschema_types(), roles_has_privs_of(), and roles_is_member_of().

1000 {
1001  if (list_member_oid(list, datum))
1002  return list;
1003  else
1004  return lappend_oid(list, datum);
1005 }
List * lappend_oid(List *list, Oid datum)
Definition: list.c:164
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:505
tuple list
Definition: sort-test.py:11
List* list_append_unique_ptr ( List list,
void *  datum 
)

Definition at line 975 of file list.c.

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

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

976 {
977  if (list_member_ptr(list, datum))
978  return list;
979  else
980  return lappend(list, datum);
981 }
List * lappend(List *list, void *datum)
Definition: list.c:128
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:465
tuple list
Definition: sort-test.py:11
List* list_concat ( List list1,
List list2 
)

Definition at line 321 of file list.c.

References Assert, check_list_invariants, elog, ERROR, List::head, List::length, ListCell::next, NIL, List::tail, and List::type.

Referenced by accumulate_append_subpath(), add_function_defaults(), add_predicate_to_quals(), addRangeTableEntryForJoin(), ATExecAttachPartition(), ATPostAlterTypeParse(), AtSubCommit_Notify(), build_joinrel_restrictlist(), build_paths_for_OR(), check_index_predicates(), check_sql_fn_retval(), choose_bitmap_and(), convert_EXISTS_sublink_to_join(), cost_index(), create_bitmap_subplan(), create_index_paths(), create_join_plan(), create_scan_plan(), deconstruct_recurse(), DefineRelation(), estimate_path_cost_size(), expand_groupingset_node(), expand_indexqual_conditions(), expand_inherited_rtentry(), ExpandAllTables(), expandRTE(), extract_or_clause(), extract_rollup_sets(), fileBeginForeignScan(), fileGetOptions(), find_forced_null_vars(), find_indexpath_quals(), find_mergeclauses_for_pathkeys(), find_nonnullable_vars_walker(), fireRIRrules(), flatten_grouping_sets(), fmgr_sql_validator(), foreign_join_ok(), generate_bitmap_or_paths(), generate_join_implied_equalities_for_ecs(), generate_join_implied_equalities_normal(), generate_partition_qual(), generate_union_path(), get_baserel_parampathinfo(), get_foreign_key_join_selectivity(), get_from_clause_item(), get_index_paths(), get_join_index_paths(), get_joinrel_parampathinfo(), get_parameterized_baserel_size(), get_relation_constraints(), get_rels_with_domain(), gincostestimate(), inheritance_planner(), init_sql_fcache(), inline_set_returning_function(), make_pathkeys_for_window(), MergeAttributes(), objectsInSchemaToOids(), process_equivalence(), process_matched_tle(), process_sublinks_mutator(), pull_ands(), pull_ors(), pull_up_simple_subquery(), pull_up_simple_union_all(), recurse_union_children(), reduce_outer_joins_pass2(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), selectColorTrigrams(), set_plan_refs(), set_subqueryscan_references(), simplify_and_arguments(), simplify_or_arguments(), split_pathtarget_at_srfs(), split_pathtarget_walker(), SyncRepGetSyncStandbysPriority(), TidQualFromExpr(), transformAExprIn(), transformAlterTableStmt(), transformCreateSchemaStmt(), transformCreateStmt(), transformExpressionList(), transformFromClause(), transformFromClauseItem(), and transformTargetList().

322 {
323  if (list1 == NIL)
324  return list2;
325  if (list2 == NIL)
326  return list1;
327  if (list1 == list2)
328  elog(ERROR, "cannot list_concat() a list to itself");
329 
330  Assert(list1->type == list2->type);
331 
332  list1->length += list2->length;
333  list1->tail->next = list2->head;
334  list1->tail = list2->tail;
335 
336  check_list_invariants(list1);
337  return list1;
338 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
#define ERROR
Definition: elog.h:43
ListCell * next
Definition: pg_list.h:61
#define Assert(condition)
Definition: c.h:671
int length
Definition: pg_list.h:48
NodeTag type
Definition: pg_list.h:47
ListCell * head
Definition: pg_list.h:49
#define elog
Definition: elog.h:219
ListCell * tail
Definition: pg_list.h:50
List* list_concat_unique ( List list1,
List list2 
)

Definition at line 1018 of file list.c.

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

Referenced by create_bitmap_subplan().

1019 {
1020  ListCell *cell;
1021 
1022  Assert(IsPointerList(list1));
1023  Assert(IsPointerList(list2));
1024 
1025  foreach(cell, list2)
1026  {
1027  if (!list_member(list1, lfirst(cell)))
1028  list1 = lappend(list1, lfirst(cell));
1029  }
1030 
1031  check_list_invariants(list1);
1032  return list1;
1033 }
#define check_list_invariants(l)
Definition: list.c:54
bool list_member(const List *list, const void *datum)
Definition: list.c:444
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
List* list_concat_unique_int ( List list1,
List list2 
)

Definition at line 1061 of file list.c.

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

1062 {
1063  ListCell *cell;
1064 
1065  Assert(IsIntegerList(list1));
1066  Assert(IsIntegerList(list2));
1067 
1068  foreach(cell, list2)
1069  {
1070  if (!list_member_int(list1, lfirst_int(cell)))
1071  list1 = lappend_int(list1, lfirst_int(cell));
1072  }
1073 
1074  check_list_invariants(list1);
1075  return list1;
1076 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
bool list_member_int(const List *list, int datum)
Definition: list.c:485
List * lappend_int(List *list, int datum)
Definition: list.c:146
#define Assert(condition)
Definition: c.h:671
List* list_concat_unique_oid ( List list1,
List list2 
)

Definition at line 1082 of file list.c.

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

Referenced by GetRelationPublicationActions().

1083 {
1084  ListCell *cell;
1085 
1086  Assert(IsOidList(list1));
1087  Assert(IsOidList(list2));
1088 
1089  foreach(cell, list2)
1090  {
1091  if (!list_member_oid(list1, lfirst_oid(cell)))
1092  list1 = lappend_oid(list1, lfirst_oid(cell));
1093  }
1094 
1095  check_list_invariants(list1);
1096  return list1;
1097 }
#define check_list_invariants(l)
Definition: list.c:54
List * lappend_oid(List *list, Oid datum)
Definition: list.c:164
#define IsOidList(l)
Definition: list.c:27
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:505
#define Assert(condition)
Definition: c.h:671
#define lfirst_oid(lc)
Definition: pg_list.h:108
List* list_concat_unique_ptr ( List list1,
List list2 
)

Definition at line 1040 of file list.c.

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

1041 {
1042  ListCell *cell;
1043 
1044  Assert(IsPointerList(list1));
1045  Assert(IsPointerList(list2));
1046 
1047  foreach(cell, list2)
1048  {
1049  if (!list_member_ptr(list1, lfirst(cell)))
1050  list1 = lappend(list1, lfirst(cell));
1051  }
1052 
1053  check_list_invariants(list1);
1054  return list1;
1055 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:465
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
List* list_copy ( const List list)

Definition at line 1160 of file list.c.

References check_list_invariants, ListCell::data, List::head, List::length, new_list(), ListCell::next, NIL, NULL, palloc(), List::tail, and List::type.

Referenced by accumulate_append_subpath(), add_function_defaults(), adjust_rowcompare_for_index(), arrayconst_startup_fn(), arrayexpr_startup_fn(), build_paths_for_OR(), build_subplan(), check_index_predicates(), choose_bitmap_and(), copy_pathtarget(), copyObject(), CopyOverrideSearchPath(), create_scan_plan(), does_not_exist_skipping(), estimate_path_cost_size(), EventTriggerCollectGrant(), expand_groupingset_node(), expression_tree_mutator(), extract_or_clause(), fetch_search_path(), find_indexpath_quals(), foreign_join_ok(), generate_bitmap_or_paths(), generate_mergejoin_paths(), get_eclass_for_sort_expr(), get_foreign_key_join_selectivity(), get_from_clause_item(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_opf_member(), get_object_address_relobject(), get_parameterized_baserel_size(), get_query_def(), get_required_extension(), get_switched_clauses(), get_useful_pathkeys_for_relation(), GetOverrideSearchPath(), init_sql_fcache(), list_difference(), list_difference_int(), list_difference_oid(), list_difference_ptr(), list_union(), list_union_int(), list_union_oid(), list_union_ptr(), make_pathkeys_for_window(), owningrel_does_not_exist_skipping(), process_matched_tle(), process_owned_by(), PushOverrideSearchPath(), recomputeNamespacePath(), RelationGetIndexList(), RelationSetIndexList(), remove_rel_from_query(), reorder_grouping_sets(), roles_has_privs_of(), roles_is_member_of(), select_outer_pathkeys_for_merge(), set_plan_refs(), set_using_names(), SetReindexPending(), simplify_and_arguments(), simplify_or_arguments(), sort_inner_and_outer(), transformWithClause(), and truncate_useless_pathkeys().

1161 {
1162  List *newlist;
1163  ListCell *newlist_prev;
1164  ListCell *oldlist_cur;
1165 
1166  if (oldlist == NIL)
1167  return NIL;
1168 
1169  newlist = new_list(oldlist->type);
1170  newlist->length = oldlist->length;
1171 
1172  /*
1173  * Copy over the data in the first cell; new_list() has already allocated
1174  * the head cell itself
1175  */
1176  newlist->head->data = oldlist->head->data;
1177 
1178  newlist_prev = newlist->head;
1179  oldlist_cur = oldlist->head->next;
1180  while (oldlist_cur)
1181  {
1182  ListCell *newlist_cur;
1183 
1184  newlist_cur = (ListCell *) palloc(sizeof(*newlist_cur));
1185  newlist_cur->data = oldlist_cur->data;
1186  newlist_prev->next = newlist_cur;
1187 
1188  newlist_prev = newlist_cur;
1189  oldlist_cur = oldlist_cur->next;
1190  }
1191 
1192  newlist_prev->next = NULL;
1193  newlist->tail = newlist_prev;
1194 
1195  check_list_invariants(newlist);
1196  return newlist;
1197 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
union ListCell::@46 data
ListCell * next
Definition: pg_list.h:61
#define NULL
Definition: c.h:226
int length
Definition: pg_list.h:48
void * palloc(Size size)
Definition: mcxt.c:891
ListCell * head
Definition: pg_list.h:49
Definition: pg_list.h:45
ListCell * tail
Definition: pg_list.h:50
List* list_copy_tail ( const List list,
int  nskip 
)

Definition at line 1203 of file list.c.

References check_list_invariants, ListCell::data, List::head, List::length, new_list(), ListCell::next, NIL, NULL, palloc(), List::tail, and List::type.

Referenced by addRangeTableEntryForJoin(), does_not_exist_skipping(), expandRTE(), find_expr_references_walker(), get_name_for_var_field(), get_object_address_opcf(), inheritance_planner(), ParseFuncOrColumn(), and transformAggregateCall().

1204 {
1205  List *newlist;
1206  ListCell *newlist_prev;
1207  ListCell *oldlist_cur;
1208 
1209  if (nskip < 0)
1210  nskip = 0; /* would it be better to elog? */
1211 
1212  if (oldlist == NIL || nskip >= oldlist->length)
1213  return NIL;
1214 
1215  newlist = new_list(oldlist->type);
1216  newlist->length = oldlist->length - nskip;
1217 
1218  /*
1219  * Skip over the unwanted elements.
1220  */
1221  oldlist_cur = oldlist->head;
1222  while (nskip-- > 0)
1223  oldlist_cur = oldlist_cur->next;
1224 
1225  /*
1226  * Copy over the data in the first remaining cell; new_list() has already
1227  * allocated the head cell itself
1228  */
1229  newlist->head->data = oldlist_cur->data;
1230 
1231  newlist_prev = newlist->head;
1232  oldlist_cur = oldlist_cur->next;
1233  while (oldlist_cur)
1234  {
1235  ListCell *newlist_cur;
1236 
1237  newlist_cur = (ListCell *) palloc(sizeof(*newlist_cur));
1238  newlist_cur->data = oldlist_cur->data;
1239  newlist_prev->next = newlist_cur;
1240 
1241  newlist_prev = newlist_cur;
1242  oldlist_cur = oldlist_cur->next;
1243  }
1244 
1245  newlist_prev->next = NULL;
1246  newlist->tail = newlist_prev;
1247 
1248  check_list_invariants(newlist);
1249  return newlist;
1250 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
static List * new_list(NodeTag type)
Definition: list.c:63
union ListCell::@46 data
ListCell * next
Definition: pg_list.h:61
#define NULL
Definition: c.h:226
int length
Definition: pg_list.h:48
void * palloc(Size size)
Definition: mcxt.c:891
ListCell * head
Definition: pg_list.h:49
Definition: pg_list.h:45
ListCell * tail
Definition: pg_list.h:50
List* list_delete ( List list,
void *  datum 
)

Definition at line 567 of file list.c.

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

Referenced by postgresGetForeignPlan().

568 {
569  ListCell *cell;
570  ListCell *prev;
571 
572  Assert(IsPointerList(list));
573  check_list_invariants(list);
574 
575  prev = NULL;
576  foreach(cell, list)
577  {
578  if (equal(lfirst(cell), datum))
579  return list_delete_cell(list, cell, prev);
580 
581  prev = cell;
582  }
583 
584  /* Didn't find a match: return the list unmodified */
585  return list;
586 }
bool equal(const void *a, const void *b)
Definition: equalfuncs.c:2870
#define check_list_invariants(l)
Definition: list.c:54
#define IsPointerList(l)
Definition: list.c:25
List * list_delete_cell(List *list, ListCell *cell, ListCell *prev)
Definition: list.c:528
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
tuple list
Definition: sort-test.py:11
List* list_delete_cell ( List list,
ListCell cell,
ListCell prev 
)

Definition at line 528 of file list.c.

References Assert, check_list_invariants, List::head, List::length, sort-test::list, list_free(), list_head(), lnext, ListCell::next, NIL, NULL, pfree(), and List::tail.

Referenced by add_partial_path(), add_path(), addKey(), AlterTSDictionary(), AtEOSubXact_on_commit_actions(), AtEOXact_on_commit_actions(), choose_bitmap_and(), create_nestloop_plan(), Exec_UnlistenCommit(), fileGetOptions(), get_foreign_key_join_selectivity(), get_qual_for_list(), list_delete(), list_delete_first(), list_delete_int(), list_delete_oid(), list_delete_ptr(), merge_clump(), MergeAttributes(), reconsider_outer_join_clauses(), RememberFsyncRequest(), select_active_windows(), sepgsql_avc_reclaim(), sepgsql_subxact_callback(), SetClientEncoding(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), SyncRepGetSyncStandbysPriority(), and transformGenericOptions().

529 {
530  check_list_invariants(list);
531  Assert(prev != NULL ? lnext(prev) == cell : list_head(list) == cell);
532 
533  /*
534  * If we're about to delete the last node from the list, free the whole
535  * list instead and return NIL, which is the only valid representation of
536  * a zero-length list.
537  */
538  if (list->length == 1)
539  {
540  list_free(list);
541  return NIL;
542  }
543 
544  /*
545  * Otherwise, adjust the necessary list links, deallocate the particular
546  * node we have just removed, and return the list we were given.
547  */
548  list->length--;
549 
550  if (prev)
551  prev->next = cell->next;
552  else
553  list->head = cell->next;
554 
555  if (list->tail == cell)
556  list->tail = prev;
557 
558  pfree(cell);
559  return list;
560 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
void pfree(void *pointer)
Definition: mcxt.c:992
static ListCell * list_head(const List *l)
Definition: pg_list.h:77
#define lnext(lc)
Definition: pg_list.h:105
ListCell * next
Definition: pg_list.h:61
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
int length
Definition: pg_list.h:48
tuple list
Definition: sort-test.py:11
ListCell * head
Definition: pg_list.h:49
void list_free(List *list)
Definition: list.c:1133
ListCell * tail
Definition: pg_list.h:50
List* list_delete_first ( List list)

Definition at line 666 of file list.c.

References check_list_invariants, list_delete_cell(), list_head(), NIL, and NULL.

Referenced by add_function_defaults(), AtEOSubXact_Namespace(), AtEOXact_Namespace(), AtSubAbort_Notify(), AtSubCommit_Notify(), CheckAttributeType(), checkWellFormedRecursionWalker(), CreateExtensionInternal(), ExplainCloseGroup(), ExplainEndOutput(), ExplainNode(), fetch_search_path(), find_expr_references_walker(), fireRIRrules(), func_get_detail(), get_name_for_var_field(), GetOverrideSearchPath(), gistEmptyAllBuffers(), gistFindPath(), gistfinishsplit(), gistProcessEmptyingQueue(), inline_function(), makeDependencyGraphWalker(), mdpostckpt(), PLy_abort_open_subtransactions(), PLy_subtransaction_exit(), pop_child_plan(), PopOverrideSearchPath(), processState(), RewriteQuery(), select_active_windows(), show_agg_keys(), show_group_keys(), simplify_and_arguments(), simplify_or_arguments(), spgWalk(), transformGraph(), and transformWithClause().

667 {
668  check_list_invariants(list);
669 
670  if (list == NIL)
671  return NIL; /* would an error be better? */
672 
673  return list_delete_cell(list, list_head(list), NULL);
674 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
static ListCell * list_head(const List *l)
Definition: pg_list.h:77
List * list_delete_cell(List *list, ListCell *cell, ListCell *prev)
Definition: list.c:528
#define NULL
Definition: c.h:226
List* list_delete_int ( List list,
int  datum 
)

Definition at line 613 of file list.c.

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

Referenced by reorder_grouping_sets().

614 {
615  ListCell *cell;
616  ListCell *prev;
617 
618  Assert(IsIntegerList(list));
619  check_list_invariants(list);
620 
621  prev = NULL;
622  foreach(cell, list)
623  {
624  if (lfirst_int(cell) == datum)
625  return list_delete_cell(list, cell, prev);
626 
627  prev = cell;
628  }
629 
630  /* Didn't find a match: return the list unmodified */
631  return list;
632 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
List * list_delete_cell(List *list, ListCell *cell, ListCell *prev)
Definition: list.c:528
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
tuple list
Definition: sort-test.py:11
List* list_delete_oid ( List list,
Oid  datum 
)

Definition at line 636 of file list.c.

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

Referenced by RemoveReindexPending().

637 {
638  ListCell *cell;
639  ListCell *prev;
640 
641  Assert(IsOidList(list));
642  check_list_invariants(list);
643 
644  prev = NULL;
645  foreach(cell, list)
646  {
647  if (lfirst_oid(cell) == datum)
648  return list_delete_cell(list, cell, prev);
649 
650  prev = cell;
651  }
652 
653  /* Didn't find a match: return the list unmodified */
654  return list;
655 }
#define check_list_invariants(l)
Definition: list.c:54
List * list_delete_cell(List *list, ListCell *cell, ListCell *prev)
Definition: list.c:528
#define IsOidList(l)
Definition: list.c:27
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
tuple list
Definition: sort-test.py:11
#define lfirst_oid(lc)
Definition: pg_list.h:108
List* list_delete_ptr ( List list,
void *  datum 
)

Definition at line 590 of file list.c.

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

Referenced by add_unique_group_var(), adjustJoinTreeList(), ConvertTriggerToFK(), FreeExprContext(), ParseFuncOrColumn(), process_equivalence(), reconsider_full_join_clause(), remove_join_clause_from_rels(), remove_rel_from_query(), remove_useless_joins(), rewriteTargetView(), sort_inner_and_outer(), and transformMultiAssignRef().

591 {
592  ListCell *cell;
593  ListCell *prev;
594 
595  Assert(IsPointerList(list));
596  check_list_invariants(list);
597 
598  prev = NULL;
599  foreach(cell, list)
600  {
601  if (lfirst(cell) == datum)
602  return list_delete_cell(list, cell, prev);
603 
604  prev = cell;
605  }
606 
607  /* Didn't find a match: return the list unmodified */
608  return list;
609 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsPointerList(l)
Definition: list.c:25
List * list_delete_cell(List *list, ListCell *cell, ListCell *prev)
Definition: list.c:528
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
tuple list
Definition: sort-test.py:11
List* list_difference ( const List list1,
const List list2 
)

Definition at line 858 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().

859 {
860  const ListCell *cell;
861  List *result = NIL;
862 
863  Assert(IsPointerList(list1));
864  Assert(IsPointerList(list2));
865 
866  if (list2 == NIL)
867  return list_copy(list1);
868 
869  foreach(cell, list1)
870  {
871  if (!list_member(list2, lfirst(cell)))
872  result = lappend(result, lfirst(cell));
873  }
874 
875  check_list_invariants(result);
876  return result;
877 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
bool list_member(const List *list, const void *datum)
Definition: list.c:444
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
Definition: pg_list.h:45
List* list_difference_int ( const List list1,
const List list2 
)

Definition at line 909 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().

910 {
911  const ListCell *cell;
912  List *result = NIL;
913 
914  Assert(IsIntegerList(list1));
915  Assert(IsIntegerList(list2));
916 
917  if (list2 == NIL)
918  return list_copy(list1);
919 
920  foreach(cell, list1)
921  {
922  if (!list_member_int(list2, lfirst_int(cell)))
923  result = lappend_int(result, lfirst_int(cell));
924  }
925 
926  check_list_invariants(result);
927  return result;
928 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
bool list_member_int(const List *list, int datum)
Definition: list.c:485
List * lappend_int(List *list, int datum)
Definition: list.c:146
#define Assert(condition)
Definition: c.h:671
Definition: pg_list.h:45
List* list_difference_oid ( const List list1,
const List list2 
)

Definition at line 934 of file list.c.

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

935 {
936  const ListCell *cell;
937  List *result = NIL;
938 
939  Assert(IsOidList(list1));
940  Assert(IsOidList(list2));
941 
942  if (list2 == NIL)
943  return list_copy(list1);
944 
945  foreach(cell, list1)
946  {
947  if (!list_member_oid(list2, lfirst_oid(cell)))
948  result = lappend_oid(result, lfirst_oid(cell));
949  }
950 
951  check_list_invariants(result);
952  return result;
953 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
List * lappend_oid(List *list, Oid datum)
Definition: list.c:164
#define IsOidList(l)
Definition: list.c:27
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:505
#define Assert(condition)
Definition: c.h:671
Definition: pg_list.h:45
#define lfirst_oid(lc)
Definition: pg_list.h:108
List* list_difference_ptr ( const List list1,
const List list2 
)

Definition at line 884 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().

885 {
886  const ListCell *cell;
887  List *result = NIL;
888 
889  Assert(IsPointerList(list1));
890  Assert(IsPointerList(list2));
891 
892  if (list2 == NIL)
893  return list_copy(list1);
894 
895  foreach(cell, list1)
896  {
897  if (!list_member_ptr(list2, lfirst(cell)))
898  result = lappend(result, lfirst(cell));
899  }
900 
901  check_list_invariants(result);
902  return result;
903 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:465
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
Definition: pg_list.h:45
void list_free ( List list)

Definition at line 1133 of file list.c.

References list_free_private().

Referenced by AfterTriggerSetState(), AlterIndexNamespaces(), arrayconst_cleanup_fn(), arrayexpr_cleanup_fn(), AtEOSubXact_cleanup(), AtEOSubXact_Namespace(), AtEOXact_cleanup(), AtEOXact_Namespace(), ATExecChangeOwner(), ATExecDropNotNull(), ATExecSetTableSpace(), build_base_rel_tlists(), 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(), CopyFromInsertBatch(), CreateExtensionInternal(), current_schema(), current_schemas(), distribute_qual_to_rels(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), EventTriggerTableRewrite(), ExecInsert(), ExecOpenIndices(), ExecRefreshMatView(), ExecResetTupleTable(), ExecSimpleRelationDelete(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), ExecUpdate(), extract_lateral_references(), ExtractExtensionList(), find_all_inheritors(), find_compatible_peragg(), find_expr_references_walker(), find_hash_columns(), find_placeholders_in_expr(), fix_placeholder_input_needed_levels(), freeScanStack(), generate_base_implied_equalities_no_const(), get_rel_sync_entry(), get_relation_info(), infer_arbiter_indexes(), is_admin_of_role(), list_delete_cell(), load_libraries(), make_group_input_target(), make_partial_grouping_target(), make_pathkeys_for_window(), make_sort_input_target(), make_window_input_target(), OpenTableList(), pgstat_write_statsfiles(), plpgsql_extra_checks_check_hook(), pop_ancestor_plan(), PopOverrideSearchPath(), PostmasterMain(), prepare_sort_from_pathkeys(), PrepareTempTablespaces(), preprocess_targetlist(), qual_is_pushdown_safe(), recomputeNamespacePath(), refresh_by_match_merge(), RelationCacheInvalidate(), RelationDestroyRelation(), RelationGetIndexAttrBitmap(), RelationGetIndexList(), RelationGetOidIndex(), RelationGetPrimaryKeyIndex(), RelationGetReplicaIndex(), relationHasPrimaryKey(), RelationHasUnloggedIndex(), RelationSetIndexList(), reorder_grouping_sets(), roles_has_privs_of(), roles_is_member_of(), sepgsql_dml_privileges(), stringToQualifiedNameList(), SyncRepGetSyncRecPtr(), SyncRepGetSyncStandbysPriority(), textToQualifiedNameList(), TidQualFromExpr(), toast_open_indexes(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformValuesClause(), triggered_change_notification(), typeInheritsFrom(), vac_open_indexes(), and WaitForLockers().

1134 {
1135  list_free_private(list, false);
1136 }
static void list_free_private(List *list, bool deep)
Definition: list.c:1103
void list_free_deep ( List list)

Definition at line 1147 of file list.c.

References Assert, IsPointerList, and list_free_private().

Referenced by checkSharedDependencies(), Exec_UnlistenAllCommit(), FreeSubscription(), get_rel_sync_entry(), gistbufferinginserttuples(), lookup_proof_cache(), PostmasterMain(), RelationDestroyRelation(), RelationGetFKeyList(), rescanLatestTimeLine(), StartReplication(), WaitForLockersMultiple(), and XLogSendPhysical().

1148 {
1149  /*
1150  * A "deep" free operation only makes sense on a list of pointers.
1151  */
1152  Assert(IsPointerList(list));
1153  list_free_private(list, true);
1154 }
#define IsPointerList(l)
Definition: list.c:25
#define Assert(condition)
Definition: c.h:671
static void list_free_private(List *list, bool deep)
Definition: list.c:1103
static ListCell* list_head ( const List l)
inlinestatic

Definition at line 77 of file pg_list.h.

References List::head, and NULL.

Referenced by add_partial_path(), add_path(), add_unique_group_var(), addKey(), adjust_rowcompare_for_index(), AlterTSDictionary(), analyzeCTE(), appendTypeNameToBuffer(), arrayexpr_startup_fn(), assign_hypothetical_collations(), ATAddForeignKeyConstraint(), AtEOSubXact_on_commit_actions(), AtEOXact_on_commit_actions(), boolexpr_startup_fn(), build_index_tlist(), BuildDescFromLists(), buildRelationAliases(), checkWellFormedRecursionWalker(), choose_bitmap_and(), coerce_record_to_complex(), compare_tlist_datatypes(), ComputeIndexAttrs(), ConstructTupleDescriptor(), convert_EXISTS_to_ANY(), cost_bitmap_and_node(), cost_bitmap_or_node(), create_append_path(), create_ctas_nodata(), create_mergejoin_plan(), create_modifytable_path(), create_nestloop_plan(), DefineView(), deparseArrayRef(), deparseOpExpr(), determineRecursiveColTypes(), do_analyze_rel(), dump_getdiag(), estimate_num_groups(), examine_variable(), exec_stmt_raise(), ExecIndexBuildScanKeys(), ExecInitJunkFilterConversion(), ExecSecLabelStmt(), expand_grouping_sets(), expand_inherited_tables(), expand_targetlist(), expandRTE(), expandTupleDesc(), exprTypmod(), extract_rollup_sets(), fix_indexqual_operand(), flatten_set_variable_args(), FormIndexDatum(), FormPartitionKeyDatum(), funcname_signature_string(), generate_append_tlist(), generate_setop_grouplist(), generate_setop_tlist(), generateClonedIndexStmt(), get_foreign_key_join_selectivity(), get_from_clause_coldeflist(), get_object_address(), get_qual_for_list(), get_qual_for_range(), get_rule_expr(), get_update_query_targetlist_def(), insert_ordered_oid(), insert_ordered_unique_oid(), intorel_startup(), is_partition_attr(), join_search_one_level(), list_delete_cell(), list_delete_first(), list_free_private(), list_startup_fn(), LookupFuncNameTypeNames(), make_inner_pathkeys_for_merge(), makeDependencyGraphWalker(), match_index_to_operand(), merge_clump(), NameListToQuotedString(), NameListToString(), OverrideSearchPathMatchesCurrent(), parse_hba_line(), parse_ident_line(), parseCheckAggregates(), ParseFuncOrColumn(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_publication_tables(), pg_listening_channels(), postprocess_setop_tlist(), PreCommit_Notify(), print_function_arguments(), printSubscripts(), ProcedureCreate(), process_startup_options(), query_is_distinct_for(), reconsider_outer_join_clauses(), RelationBuildPartitionKey(), RememberFsyncRequest(), remove_rel_from_query(), RemoveObjects(), select_active_windows(), select_common_type(), SendRowDescriptionMessage(), sepgsql_avc_reclaim(), sepgsql_subxact_callback(), SetClientEncoding(), sort_inner_and_outer(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), SyncRepGetSyncStandbysPriority(), tlist_matches_coltypelist(), tlist_matches_tupdesc(), tlist_same_collations(), tlist_same_datatypes(), transformAssignedExpr(), transformInsertRow(), transformSetOperationStmt(), transformUpdateTargetList(), and TypeNameListToString().

78 {
79  return l ? l->head : NULL;
80 }
#define NULL
Definition: c.h:226
ListCell * head
Definition: pg_list.h:49
List* list_intersection ( const List list1,
const List list2 
)

Definition at line 800 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().

801 {
802  List *result;
803  const ListCell *cell;
804 
805  if (list1 == NIL || list2 == NIL)
806  return NIL;
807 
808  Assert(IsPointerList(list1));
809  Assert(IsPointerList(list2));
810 
811  result = NIL;
812  foreach(cell, list1)
813  {
814  if (list_member(list2, lfirst(cell)))
815  result = lappend(result, lfirst(cell));
816  }
817 
818  check_list_invariants(result);
819  return result;
820 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
bool list_member(const List *list, const void *datum)
Definition: list.c:444
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
Definition: pg_list.h:45
List* list_intersection_int ( const List list1,
const List list2 
)

Definition at line 826 of file list.c.

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

Referenced by parseCheckAggregates().

827 {
828  List *result;
829  const ListCell *cell;
830 
831  if (list1 == NIL || list2 == NIL)
832  return NIL;
833 
834  Assert(IsIntegerList(list1));
835  Assert(IsIntegerList(list2));
836 
837  result = NIL;
838  foreach(cell, list1)
839  {
840  if (list_member_int(list2, lfirst_int(cell)))
841  result = lappend_int(result, lfirst_int(cell));
842  }
843 
844  check_list_invariants(result);
845  return result;
846 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
bool list_member_int(const List *list, int datum)
Definition: list.c:485
List * lappend_int(List *list, int datum)
Definition: list.c:146
#define Assert(condition)
Definition: c.h:671
Definition: pg_list.h:45
static int list_length ( const List l)
inlinestatic

Definition at line 89 of file pg_list.h.

References List::length.

Referenced by _copyList(), _copyMergeJoin(), _outForeignKeyOptInfo(), _outMergeJoin(), _outPathTarget(), _readMergeJoin(), acquire_inherited_sample_rows(), add_column_to_pathtarget(), add_function_defaults(), add_rte_to_flat_rtable(), add_security_quals(), add_to_flat_tlist(), add_with_check_options(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRoleMems(), adjust_appendrel_attrs_mutator(), adjust_inherited_tlist(), adjust_paths_for_srfs(), adjust_rowcompare_for_index(), AlterDatabase(), AlterExtensionNamespace(), AlterPublicationOptions(), AlterPublicationTables(), analyzeCTETargetList(), apply_tlist_labeling(), ApplyRetrieveRule(), assign_hypothetical_collations(), assign_ordered_set_collations(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAlterColumnType(), ATPrepChangePersistence(), AtSubAbort_Notify(), AtSubCommit_Notify(), AtSubStart_Notify(), BeginCopy(), BeginCopyFrom(), brincostestimate(), btvalidate(), build_pertrans_for_aggref(), build_simple_rel(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), BuildDescForRelation(), BuildDescFromLists(), buildRelationAliases(), buildSubPlanHash(), cached_plan_cost(), check_hashjoinable(), check_mergejoinable(), check_selective_binary_conversion(), check_temp_tablespaces(), check_ungrouped_columns_walker(), CheckIndexCompatible(), choose_bitmap_and(), choose_hashed_setop(), ChoosePortalStrategy(), clauselist_selectivity(), cmp_list_len_asc(), CommentObject(), CommuteOpExpr(), compute_semijoin_info(), ComputeIndexAttrs(), connect_pg_server(), consider_index_join_clauses(), consider_index_join_outer_rels(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), convert_requires_to_datum(), convert_subquery_pathkeys(), convert_testexpr_mutator(), cookConstraint(), copy_pathtarget(), CopyOneRowTo(), CopyTo(), count_rowexpr_columns(), create_agg_path(), create_agg_plan(), create_bitmap_subplan(), create_ctescan_plan(), create_distinct_paths(), create_group_path(), create_group_plan(), create_grouping_paths(), create_groupingsets_path(), create_groupingsets_plan(), create_hashjoin_plan(), create_indexscan_plan(), create_merge_append_path(), create_mergejoin_plan(), create_modifytable_path(), create_setop_path(), create_tidscan_plan(), create_unique_path(), create_unique_plan(), create_windowagg_path(), CreateExtensionInternal(), CreateFunction(), CreatePublication(), CreateTrigger(), current_schemas(), currtid_for_view(), deconstruct_recurse(), DeconstructQualifiedName(), DefineAggregate(), DefineCollation(), DefineDomain(), DefineIndex(), DefineQueryRewrite(), DefineRelation(), DefineVirtualRelation(), DelRoleMems(), deparseDistinctExpr(), deparseOpExpr(), deparseScalarArrayOpExpr(), do_analyze_rel(), does_not_exist_skipping(), domainAddConstraint(), eclass_useful_for_merging(), EnumValuesCreate(), equalRSDesc(), estimate_array_length(), estimate_num_groups(), estimate_path_cost_size(), eval_const_expressions_mutator(), EvalPlanQualBegin(), EvalPlanQualStart(), EvaluateParams(), EventTriggerAlterTableEnd(), examine_simple_variable(), exec_eval_using_params(), exec_parse_message(), exec_simple_check_plan(), exec_simple_query(), exec_simple_recheck_plan(), ExecCreateTableAs(), ExecEvalArray(), ExecEvalWholeRowVar(), ExecEvalXml(), ExecHashTableCreate(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitAlternativeSubPlan(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapOr(), ExecInitExpr(), ExecInitFunctionScan(), ExecInitIndexScan(), ExecInitLockRows(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitProjectSet(), ExecInitSubPlan(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecMakeTableFunctionResult(), ExecOpenIndices(), ExecRefreshMatView(), ExecScanSubPlan(), ExecSetParamPlan(), ExecSetupPartitionTupleRouting(), ExecTargetListLength(), ExecTypeFromExprList(), ExecuteQuery(), ExecuteTruncate(), expand_function_arguments(), expand_grouping_sets(), expand_groupingset_node(), expand_indexqual_conditions(), expand_inherited_rtentry(), expand_inherited_tables(), ExpandColumnRefStar(), ExpandIndirectionStar(), expandRecordVariable(), expandRTE(), ExplainCustomChildren(), ExplainMemberNodes(), ExplainNode(), ExplainOneUtility(), ExplainTargetRel(), ExportSnapshot(), exprIsLengthCoercion(), extract_grouping_cols(), extract_grouping_ops(), extract_rollup_sets(), extractRemainingColumns(), filter_list_to_array(), finalize_plan(), find_duplicate_ors(), find_expr_references_walker(), find_install_path(), find_join_rel(), find_minmax_aggs_walker(), findTargetlistEntrySQL92(), fireRIRrules(), fix_indexorderby_references(), fix_indexqual_references(), fix_param_node(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_join_alias_vars_mutator(), flatten_join_using_qual(), flatten_set_variable_args(), flatten_simple_union_all(), func_get_detail(), funcname_signature_string(), generate_append_tlist(), generate_base_implied_equalities(), generate_base_implied_equalities_const(), generate_implied_equalities_for_column(), generate_join_implied_equalities_for_ecs(), generate_mergejoin_paths(), generate_nonunion_path(), genericcostestimate(), geqo_eval(), get_agg_expr(), get_aggregate_argtypes(), get_call_expr_arg_stable(), get_call_expr_argtype(), get_column_info_for_window(), get_foreign_key_join_selectivity(), get_from_clause_item(), get_func_expr(), get_join_variables(), get_name_for_var_field(), get_number_of_groups(), get_object_address(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_relobject(), get_object_address_unqualified(), get_oper_expr(), 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_rte_attribute_type(), get_rule_expr(), get_rule_groupingset(), get_simple_binary_op_name(), get_simple_values_rte(), get_update_query_targetlist_def(), get_useful_pathkeys_for_relation(), get_variable(), get_view_query(), get_windowfunc_expr(), 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(), identify_join_columns(), inheritance_planner(), init_fcache(), initial_cost_hashjoin(), initialize_peragg(), InitPlan(), inline_function(), inline_set_returning_function(), interpret_AS_clause(), interpret_function_parameter_list(), interval_transform(), is_dummy_plan(), is_safe_append_member(), is_simple_values(), is_strict_saop(), IsTidEqualAnyClause(), IsTidEqualClause(), IsTransactionExitStmtList(), IsTransactionStmtList(), length(), list_truncate(), LookupAggNameTypeNames(), LookupFuncNameTypeNames(), LookupTypeName(), make_ands_explicit(), make_modifytable(), 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_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_foreign_keys_to_quals(), MatchNamedCall(), MergeAttributes(), MJExamineQuals(), NextCopyFrom(), numeric_transform(), operator_precedence_group(), operator_predicate_proof(), order_qual_clauses(), ordered_set_startup(), owningrel_does_not_exist_skipping(), parse_tsquery(), parseCheckAggregates(), ParseFuncOrColumn(), pathkeys_useful_for_ordering(), perform_base_backup(), PerformCursorOpen(), pg_get_function_arg_default(), pg_get_object_address(), pgoutput_startup(), planstate_walk_members(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), PLy_abort_open_subtransactions(), PLy_procedure_call(), policy_role_list_to_array(), postgresAddForeignUpdateTargets(), postgresBeginDirectModify(), postgresBeginForeignModify(), postgresBeginForeignScan(), postgresExplainForeignScan(), predicate_classify(), predicate_implied_by(), predicate_refuted_by(), prepare_sort_from_pathkeys(), PrepareQuery(), PrepareTempTablespaces(), preprocess_groupclause(), preprocess_minmax_aggregates(), preprocess_targetlist(), print_expr(), print_function_arguments(), ProcedureCreate(), process_duplicate_ors(), process_owned_by(), processIndirection(), processTypesSpec(), publicationListToArray(), 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(), 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_useless_groupby_columns(), RemoveRelations(), reorder_function_arguments(), reorder_grouping_sets(), replace_domain_constraint_value(), resolve_column_ref(), resolve_special_varno(), ResolveOpClass(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListUD(), rewriteTargetView(), rewriteValuesRTE(), scalararraysel(), SearchCatCacheList(), select_outer_pathkeys_for_merge(), SendCopyBegin(), set_cte_pathlist(), set_deparse_context_planstate(), set_deparse_for_query(), set_join_column_names(), 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(), setTargetTable(), setup_simple_rel_arrays(), show_grouping_sets(), show_plan_tlist(), show_sort_group_keys(), show_tablesample(), show_upper_qual(), simplify_boolean_equality(), sort_inner_and_outer(), sort_policies_by_name(), 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_join_search(), standard_planner(), standard_qp_callback(), StoreRelCheck(), strlist_to_textarray(), SyncRepGetNthLatestSyncRecPtr(), SyncRepGetSyncRecPtr(), SyncRepGetSyncStandbysPriority(), tablesample_init(), TemporalTransform(), TidListCreate(), tlist_same_exprs(), to_regnamespace(), to_regrole(), toast_open_indexes(), trackDroppedObjectsNeeded(), transformAExprBetween(), transformAExprIn(), transformAExprOp(), transformAggregateCall(), transformColumnDefinition(), transformColumnRef(), transformCreateStmt(), transformFromClauseItem(), transformGroupingFunc(), transformGroupingSet(), transformIndexConstraint(), transformIndexStmt(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformMultiAssignRef(), transformOnConflictClause(), transformPartitionBound(), transformRangeFunction(), transformRangeTableSample(), transformRuleStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableLikeClause(), transformValuesClause(), transformWindowFuncCall(), transformWithClause(), trivial_subqueryscan(), truncate_useless_pathkeys(), tsvector_update_trigger(), TypeGetTupleDesc(), typenameTypeMod(), typeStringToTypeName(), unify_hypothetical_args(), UpdateLogicalMappings(), vac_open_indexes(), vacuum(), ValuesNext(), varbit_transform(), varchar_transform(), view_cols_are_auto_updatable(), view_query_is_auto_updatable(), and WaitForLockersMultiple().

90 {
91  return l ? l->length : 0;
92 }
int length
Definition: pg_list.h:48
bool list_member ( const List list,
const void *  datum 
)

Definition at line 444 of file list.c.

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

Referenced by add_new_column_to_pathtarget(), build_minmax_path(), create_bitmap_scan_plan(), ec_member_matches_foreign(), find_window_functions_walker(), 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().

445 {
446  const ListCell *cell;
447 
448  Assert(IsPointerList(list));
449  check_list_invariants(list);
450 
451  foreach(cell, list)
452  {
453  if (equal(lfirst(cell), datum))
454  return true;
455  }
456 
457  return false;
458 }
bool equal(const void *a, const void *b)
Definition: equalfuncs.c:2870
#define check_list_invariants(l)
Definition: list.c:54
#define IsPointerList(l)
Definition: list.c:25
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
bool list_member_int ( const List list,
int  datum 
)

Definition at line 485 of file list.c.

References Assert, check_list_invariants, IsIntegerList, and lfirst_int.

Referenced by AcquireExecutorLocks(), BeginCopy(), BeginCopyFrom(), check_ungrouped_columns_walker(), CopyGetAttnums(), estimate_num_groups(), list_append_unique_int(), list_concat_unique_int(), list_difference_int(), list_intersection_int(), list_union_int(), parseCheckAggregates(), pg_stat_get_wal_senders(), reorder_grouping_sets(), and transformDistinctOnClause().

486 {
487  const ListCell *cell;
488 
489  Assert(IsIntegerList(list));
490  check_list_invariants(list);
491 
492  foreach(cell, list)
493  {
494  if (lfirst_int(cell) == datum)
495  return true;
496  }
497 
498  return false;
499 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
#define Assert(condition)
Definition: c.h:671
bool list_member_oid ( const List list,
Oid  datum 
)

Definition at line 505 of file list.c.

References Assert, check_list_invariants, IsOidList, and lfirst_oid.

Referenced by AfterTriggerSaveEvent(), AlterTableMoveAll(), ATExecAddInherit(), ATExecAlterColumnType(), ATExecAttachPartition(), BeginCopy(), CheckAttributeType(), CollationIsVisible(), ConversionIsVisible(), ec_member_matches_indexcol(), ExecCheckIndexConstraints(), ExecInsertIndexTuples(), ExecuteTruncate(), fireRIRrules(), FunctionIsVisible(), get_rel_sync_entry(), get_transform_fromsql(), get_transform_tosql(), has_privs_of_role(), hashvalidate(), 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(), lookup_shippable(), MergeAttributes(), OpclassIsVisible(), OpenTableList(), OperatorIsVisible(), OpfamilyIsVisible(), pgstat_db_requested(), pgstat_recv_inquiry(), PlanCacheRelCallback(), recomputeNamespacePath(), ReindexIsProcessingIndex(), relation_has_unique_index_for(), RelationIsVisible(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), typeInheritsFrom(), and TypeIsVisible().

506 {
507  const ListCell *cell;
508 
509  Assert(IsOidList(list));
510  check_list_invariants(list);
511 
512  foreach(cell, list)
513  {
514  if (lfirst_oid(cell) == datum)
515  return true;
516  }
517 
518  return false;
519 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsOidList(l)
Definition: list.c:27
#define Assert(condition)
Definition: c.h:671
#define lfirst_oid(lc)
Definition: pg_list.h:108
bool list_member_ptr ( const List list,
const void *  datum 
)

Definition at line 465 of file list.c.

References Assert, check_list_invariants, IsPointerList, and lfirst.

Referenced by create_bitmap_scan_plan(), create_indexscan_plan(), extract_nonindex_conditions(), get_foreign_key_join_selectivity(), has_indexed_join_quals(), list_append_unique_ptr(), list_concat_unique_ptr(), list_difference_ptr(), list_union_ptr(), postgresGetForeignPlan(), preprocess_groupclause(), and remove_join_clause_from_rels().

466 {
467  const ListCell *cell;
468 
469  Assert(IsPointerList(list));
470  check_list_invariants(list);
471 
472  foreach(cell, list)
473  {
474  if (lfirst(cell) == datum)
475  return true;
476  }
477 
478  return false;
479 }
#define check_list_invariants(l)
Definition: list.c:54
#define IsPointerList(l)
Definition: list.c:25
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
void* list_nth ( const List list,
int  n 
)

Definition at line 410 of file list.c.

References Assert, IsPointerList, lfirst, and list_nth_cell().

Referenced by adjust_appendrel_attrs_mutator(), adjust_inherited_tlist(), ATAddForeignKeyConstraint(), conversion_error_callback(), convert_subquery_pathkeys(), convert_testexpr_mutator(), errorMissingColumn(), eval_const_expressions_mutator(), ExecAlternativeSubPlan(), ExecInitAgg(), ExecInitCteScan(), ExecInitModifyTable(), ExecInitSubPlan(), expandRecordVariable(), expandRTE(), ExplainTargetRel(), finalize_plan(), find_expr_references_walker(), find_hash_columns(), fix_param_node(), flatten_join_alias_vars_mutator(), get_call_expr_arg_stable(), get_call_expr_argtype(), get_name_for_var_field(), get_rtable_name(), get_rte_attribute_is_dropped(), get_rte_attribute_name(), get_rte_attribute_type(), get_variable(), gimme_tree(), infer_collation_opclass_match(), markRTEForSelectPriv(), markTargetListOrigin(), MergeAttributes(), pg_get_function_arg_default(), postgresBeginDirectModify(), postgresBeginForeignModify(), postgresBeginForeignScan(), postgresExplainDirectModify(), postgresExplainForeignModify(), postgresExplainForeignScan(), postgresPlanDirectModify(), postgresPlanForeignModify(), reorder_grouping_sets(), resolve_special_varno(), set_cte_pathlist(), set_join_column_names(), set_relation_column_names(), set_using_names(), show_modifytable_info(), substitute_actual_parameters_mutator(), substitute_actual_srf_parameters_mutator(), transformFromClauseItem(), transformInsertRow(), transformMultiAssignRef(), transformPartitionBound(), transformSetOperationStmt(), TypeGetTupleDesc(), WinGetFuncArgCurrent(), WinGetFuncArgInFrame(), and WinGetFuncArgInPartition().

411 {
412  Assert(IsPointerList(list));
413  return lfirst(list_nth_cell(list, n));
414 }
ListCell * list_nth_cell(const List *list, int n)
Definition: list.c:386
#define IsPointerList(l)
Definition: list.c:25
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
ListCell* list_nth_cell ( const List list,
int  n 
)

Definition at line 386 of file list.c.

References Assert, check_list_invariants, List::head, List::length, length(), ListCell::next, NIL, and List::tail.

Referenced by build_subplan(), list_nth(), list_nth_int(), list_nth_oid(), split_pathtarget_at_srfs(), and split_pathtarget_walker().

387 {
388  ListCell *match;
389 
390  Assert(list != NIL);
391  Assert(n >= 0);
392  Assert(n < list->length);
393  check_list_invariants(list);
394 
395  /* Does the caller actually mean to fetch the tail? */
396  if (n == list->length - 1)
397  return list->tail;
398 
399  for (match = list->head; n-- > 0; match = match->next)
400  ;
401 
402  return match;
403 }
#define NIL
Definition: pg_list.h:69
int length(const List *list)
Definition: list.c:1271
#define check_list_invariants(l)
Definition: list.c:54
ListCell * next
Definition: pg_list.h:61
#define Assert(condition)
Definition: c.h:671
int length
Definition: pg_list.h:48
ListCell * head
Definition: pg_list.h:49
ListCell * tail
Definition: pg_list.h:50
int list_nth_int ( const List list,
int  n 
)

Definition at line 421 of file list.c.

References Assert, IsIntegerList, lfirst_int, and list_nth_cell().

Referenced by create_ctescan_plan(), get_rte_attribute_type(), and set_cte_pathlist().

422 {
423  Assert(IsIntegerList(list));
424  return lfirst_int(list_nth_cell(list, n));
425 }
ListCell * list_nth_cell(const List *list, int n)
Definition: list.c:386
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
#define Assert(condition)
Definition: c.h:671
Oid list_nth_oid ( const List list,
int  n 
)

Definition at line 432 of file list.c.

References Assert, IsOidList, lfirst_oid, and list_nth_cell().

Referenced by get_rte_attribute_type().

433 {
434  Assert(IsOidList(list));
435  return lfirst_oid(list_nth_cell(list, n));
436 }
ListCell * list_nth_cell(const List *list, int n)
Definition: list.c:386
#define IsOidList(l)
Definition: list.c:27
#define Assert(condition)
Definition: c.h:671
#define lfirst_oid(lc)
Definition: pg_list.h:108
static ListCell* list_tail ( List l)
inlinestatic

Definition at line 83 of file pg_list.h.

References NULL, and List::tail.

Referenced by deparseOpExpr(), get_object_address_attribute(), and process_owned_by().

84 {
85  return l ? l->tail : NULL;
86 }
#define NULL
Definition: c.h:226
ListCell * tail
Definition: pg_list.h:50
List* list_truncate ( List list,
int  new_size 
)

Definition at line 350 of file list.c.

References Assert, check_list_invariants, List::length, sort-test::list, list_length(), ListCell::next, NIL, NULL, and List::tail.

Referenced by adjust_rowcompare_for_index(), does_not_exist_skipping(), ExpandIndirectionStar(), expandRTE(), generate_mergejoin_paths(), geqo_eval(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_opf_member(), get_object_address_relobject(), owningrel_does_not_exist_skipping(), ParseFuncOrColumn(), process_owned_by(), transformAggregateCall(), transformFromClauseItem(), transformSetOperationStmt(), and truncate_useless_pathkeys().

351 {
352  ListCell *cell;
353  int n;
354 
355  if (new_size <= 0)
356  return NIL; /* truncate to zero length */
357 
358  /* If asked to effectively extend the list, do nothing */
359  if (new_size >= list_length(list))
360  return list;
361 
362  n = 1;
363  foreach(cell, list)
364  {
365  if (n == new_size)
366  {
367  cell->next = NULL;
368  list->tail = cell;
369  list->length = new_size;
370  check_list_invariants(list);
371  return list;
372  }
373  n++;
374  }
375 
376  /* keep the compiler quiet; never reached */
377  Assert(false);
378  return list;
379 }
#define NIL
Definition: pg_list.h:69
#define check_list_invariants(l)
Definition: list.c:54
ListCell * next
Definition: pg_list.h:61
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:671
static int list_length(const List *l)
Definition: pg_list.h:89
int length
Definition: pg_list.h:48
tuple list
Definition: sort-test.py:11
ListCell * tail
Definition: pg_list.h:50
List* list_union ( const List list1,
const List list2 
)

Definition at line 697 of file list.c.

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

Referenced by AddRelationNewConstraints(), and process_duplicate_ors().

698 {
699  List *result;
700  const ListCell *cell;
701 
702  Assert(IsPointerList(list1));
703  Assert(IsPointerList(list2));
704 
705  result = list_copy(list1);
706  foreach(cell, list2)
707  {
708  if (!list_member(result, lfirst(cell)))
709  result = lappend(result, lfirst(cell));
710  }
711 
712  check_list_invariants(result);
713  return result;
714 }
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
bool list_member(const List *list, const void *datum)
Definition: list.c:444
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
Definition: pg_list.h:45
List* list_union_int ( const List list1,
const List list2 
)

Definition at line 744 of file list.c.

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

Referenced by expand_grouping_sets().

745 {
746  List *result;
747  const ListCell *cell;
748 
749  Assert(IsIntegerList(list1));
750  Assert(IsIntegerList(list2));
751 
752  result = list_copy(list1);
753  foreach(cell, list2)
754  {
755  if (!list_member_int(result, lfirst_int(cell)))
756  result = lappend_int(result, lfirst_int(cell));
757  }
758 
759  check_list_invariants(result);
760  return result;
761 }
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
#define IsIntegerList(l)
Definition: list.c:26
#define lfirst_int(lc)
Definition: pg_list.h:107
bool list_member_int(const List *list, int datum)
Definition: list.c:485
List * lappend_int(List *list, int datum)
Definition: list.c:146
#define Assert(condition)
Definition: c.h:671
Definition: pg_list.h:45
List* list_union_oid ( const List list1,
const List list2 
)

Definition at line 767 of file list.c.

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

768 {
769  List *result;
770  const ListCell *cell;
771 
772  Assert(IsOidList(list1));
773  Assert(IsOidList(list2));
774 
775  result = list_copy(list1);
776  foreach(cell, list2)
777  {
778  if (!list_member_oid(result, lfirst_oid(cell)))
779  result = lappend_oid(result, lfirst_oid(cell));
780  }
781 
782  check_list_invariants(result);
783  return result;
784 }
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
List * lappend_oid(List *list, Oid datum)
Definition: list.c:164
#define IsOidList(l)
Definition: list.c:27
bool list_member_oid(const List *list, Oid datum)
Definition: list.c:505
#define Assert(condition)
Definition: c.h:671
Definition: pg_list.h:45
#define lfirst_oid(lc)
Definition: pg_list.h:108
List* list_union_ptr ( const List list1,
const List list2 
)

Definition at line 721 of file list.c.

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

722 {
723  List *result;
724  const ListCell *cell;
725 
726  Assert(IsPointerList(list1));
727  Assert(IsPointerList(list2));
728 
729  result = list_copy(list1);
730  foreach(cell, list2)
731  {
732  if (!list_member_ptr(result, lfirst(cell)))
733  result = lappend(result, lfirst(cell));
734  }
735 
736  check_list_invariants(result);
737  return result;
738 }
#define check_list_invariants(l)
Definition: list.c:54
List * list_copy(const List *oldlist)
Definition: list.c:1160
#define IsPointerList(l)
Definition: list.c:25
List * lappend(List *list, void *datum)
Definition: list.c:128
bool list_member_ptr(const List *list, const void *datum)
Definition: list.c:465
#define Assert(condition)
Definition: c.h:671
#define lfirst(lc)
Definition: pg_list.h:106
Definition: pg_list.h:45