Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Defines | Typedefs | Functions

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

Defines

#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_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_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 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

ListCelllist_head (const List *l)
ListCelllist_tail (List *l)
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)
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_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)

Define Documentation

#define for_each_cell (   cell,
  initcell 
)    for ((cell) = (initcell); (cell) != NULL; (cell) = lnext(cell))
#define forboth (   cell1,
  list1,
  cell2,
  list2 
)
#define foreach (   cell,
  l 
)    for ((cell) = list_head(l); (cell) != NULL; (cell) = lnext(cell))

Definition at line 161 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))

Definition at line 189 of file pg_list.h.

Referenced by convert_EXISTS_to_ANY(), ExecInitExpr(), expandRTE(), generate_append_tlist(), generate_setop_tlist(), get_from_clause_coldeflist(), load_hba(), set_plan_refs(), and transformSetOperationStmt().

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

Definition at line 115 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_lateral_info(), add_path(), add_path_precheck(), add_paths_to_joinrel(), add_placeholders_to_base_rels(), add_placeholders_to_joinrel(), add_predicate_to_quals(), add_to_flat_tlist(), add_unique_group_var(), add_vars_to_targetlist(), addArc(), addArcs(), addFamilyMember(), addKey(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), AddRelationNewConstraints(), AddRoleMems(), adjust_inherited_tlist(), adjust_rowcompare_for_index(), adjust_view_column_set(), adjustJoinTreeList(), advance_windowaggregate(), afterTriggerInvokeEvents(), AfterTriggerSetState(), AlterDatabase(), AlterDomainNotNull(), AlterFunction(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), AlterRole(), AlterTableGetLockLevel(), AlterTSDictionary(), analyzeCTE(), analyzeCTETargetList(), appendTypeNameToBuffer(), appendWhereClause(), ApplyExtensionUpdates(), approx_tuple_count(), arrayexpr_next_fn(), assign_collations_walker(), assign_list_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(), ATExecDropInherit(), ATGetQueueEntry(), ATPostAlterTypeCleanup(), ATPostAlterTypeParse(), ATRewriteCatalogs(), ATRewriteTable(), ATRewriteTables(), bms_equal_any(), btcostestimate(), btree_xlog_cleanup(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_rel_hash(), build_joinrel_tlist(), build_paths_for_OR(), build_physical_tlist(), build_relation_tlist(), build_simple_rel(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), 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_log_destination(), check_log_statement(), check_outerjoin_delay(), check_partial_indexes(), check_redundant_nullability_qual(), check_role(), check_selective_binary_conversion(), check_sql_fn_retval(), check_temp_tablespaces(), check_ungrouped_columns_walker(), check_usermap(), checkInsertTargets(), checkNameSpaceConflicts(), checkRuleResultList(), checkSharedDependencies(), checkWellFormedRecursionWalker(), choose_bitmap_and(), ChooseConstraintName(), ChooseIndexColumnNames(), ChooseIndexNameAddition(), ChoosePortalStrategy(), classify_index_clause_usage(), classifyConditions(), clause_selectivity(), clauselist_selectivity(), 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(), ComputeIndexAttrs(), consider_index_join_outer_rels(), ConstructTupleDescriptor(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), ConvertTriggerToFK(), CopyGetAttnums(), cost_bitmap_and_node(), cost_bitmap_or_node(), cost_qual_eval(), cost_tidscan(), cost_windowagg(), count_agg_clauses_walker(), create_append_path(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_ctescan_plan(), create_cursor(), 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_nestloop_path(), create_nestloop_plan(), create_or_index_quals(), create_unique_path(), create_unique_plan(), createdb(), CreateEventTrigger(), CreateExtension(), CreateRole(), CreateSchemaCommand(), CreateTrigger(), dblink_fdw_validator(), deconstruct_recurse(), DefineAggregate(), DefineCollation(), DefineDomain(), DefineOpClass(), DefineOperator(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DefineType(), DefineView(), DefineVirtualRelation(), deflist_to_tuplestore(), DelRoleMems(), deparseAnalyzeSql(), deparseArrayExpr(), deparseArrayRef(), deparseBoolExpr(), deparseColumnRef(), deparseFuncExpr(), deparseOpExpr(), deparseParam(), deparseRelation(), deparseVar(), determineRecursiveColTypes(), dintdict_init(), dispell_init(), do_analyze_rel(), do_start_worker(), domain_check_input(), drop_indexable_join_clauses(), 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(), errdetail_execute(), estimate_num_groups(), eval_const_expressions_mutator(), EvalPlanQualEnd(), EvalPlanQualFetchRowMarks(), EvalPlanQualStart(), evaluate_function(), EvaluateParams(), EventTriggerCommonSetup(), examine_parameter_list(), examine_variable(), 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(), ExecInitHashJoin(), ExecInitJunkFilter(), ExecInitJunkFilterConversion(), ExecInitLockRows(), ExecInitMergeAppend(), ExecInitModifyTable(), ExecInitNode(), ExecInitSubPlan(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecLockRows(), ExecMakeFunctionResultNoSets(), ExecNestLoop(), ExecOpenScanRelation(), ExecPostprocessPlan(), ExecQual(), ExecReScan(), ExecResetTupleTable(), ExecScanSubPlan(), ExecSecLabelStmt(), ExecSetVariableStmt(), ExecSupportsBackwardScan(), ExecTargetList(), ExecTypeFromExprList(), ExecTypeFromTLInternal(), execute_sql_string(), ExecuteDoStmt(), ExecuteGrantStmt(), ExecuteTruncate(), expand_col_privileges(), expand_function_arguments(), expand_indexqual_conditions(), expand_inherited_tables(), expand_targetlist(), ExpandAllTables(), expandRecordVariable(), expandRelAttrs(), expandRTE(), ExpandSingleTable(), ExplainExecuteQuery(), ExplainOnePlan(), ExplainPreScanSubPlans(), ExplainPropertyList(), 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_query_dependencies_walker(), ExtractConnectionOptions(), extractRemainingColumns(), FigureColnameInternal(), file_fdw_validator(), fileGetOptions(), filter_list_to_array(), final_cost_hashjoin(), finalize_plan(), find_childrel_appendrelinfo(), find_duplicate_ors(), find_ec_member_for_tle(), find_expr_references_walker(), find_forced_null_vars(), find_indexpath_quals(), 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_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(), flatten_join_alias_vars_mutator(), flatten_join_using_qual(), flatten_set_variable_args(), flush_pipe_input(), fmgr_sql(), fmgr_sql_validator(), foreign_expr_walker(), forget_matching_deletion(), forget_matching_split(), forgetIncompleteSplit(), FormIndexDatum(), 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(), generate_join_implied_equalities_broken(), 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_all_actual_clauses(), get_appendrel_parampathinfo(), get_available_versions_for_extension(), get_base_rel_indexes(), get_baserel_parampathinfo(), get_basic_select_query(), get_bitmap_tree_required_outer(), get_btree_test_op(), get_cheapest_fractional_path_for_pathkeys(), 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_from_clause(), get_from_clause_item(), get_func_expr(), get_grouping_column_index(), 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_object_address_attribute(), get_object_address_relobject(), get_parse_rowmark(), get_plan_rowmark(), get_relids_in_jointree(), get_rels_with_domain(), get_rule_expr(), get_rule_orderby(), get_rule_windowclause(), get_rule_windowspec(), get_select_query_def(), get_simple_values_rte(), get_sortgrouplist_exprs(), get_sortgroupref_tle(), get_sublink_expr(), get_switched_clauses(), get_target_list(), get_tle_by_resno(), get_tlist_exprs(), get_update_query_def(), get_values_def(), get_windowfunc_expr(), get_with_clause(), GetCommandLogLevel(), GetCTEForRTE(), getTokenTypes(), gimme_tree(), gin_xlog_cleanup(), gincostestimate(), gistbufferinginserttuples(), gistfinishsplit(), gistRelocateBuildBuffersOnSplit(), GrantRole(), grouping_is_hashable(), grouping_is_sortable(), grouping_planner(), has_indexed_join_quals(), has_join_restriction(), has_legal_joinclause(), has_relevant_eclass_joinclause(), has_unique_index(), has_unnamed_full_join_using(), hash_inner_and_outer(), have_join_order_restriction(), have_relevant_eclass_joinclause(), have_relevant_joinclause(), heap_truncate(), heap_truncate_check_FKs(), identify_join_columns(), inheritance_planner(), init_execution_state(), init_params(), init_sql_fcache(), initialize_peragg(), InitPlan(), inline_function(), inline_set_returning_functions(), interpretOidsOption(), intorel_startup(), is_redundant_derived_clause(), isFutureCTE(), IsListeningOn(), isLockedRefname(), isQueryUsingTempRelation_walker(), join_is_legal(), join_is_removable(), join_search_one_level(), 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(), locate_grouping_columns(), LockTableCommand(), LookupAggNameTypeNames(), LookupFuncNameTypeNames(), make_append(), make_canonical_pathkey(), make_fn_arguments(), make_inner_pathkeys_for_merge(), make_modifytable(), make_outerjoininfo(), make_pathkeys_for_sortclauses(), make_recursive_union(), make_rel_from_joinlist(), make_rels_by_clause_joins(), make_rels_by_clauseless_joins(), make_restrictinfo_from_bitmapqual(), make_restrictinfos_from_actual_clauses(), 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_sub_restrictinfos(), make_subplanTargetList(), make_unique(), make_windowInputTargetList(), MakeConfigurationMapping(), makeDependencyGraphWalker(), map_sql_typecoll_to_xmlschema_types(), mark_placeholders_in_expr(), markQueryForLocking(), markTargetListOrigins(), match_clauses_to_index(), match_index_to_operand(), match_join_clauses_to_index(), match_pathkeys_to_index(), match_unsorted_outer(), MatchNamedCall(), merge_clump(), MergeAttributes(), MergeCheckConstraint(), mergeStates(), MJExamineQuals(), mutate_eclass_expressions(), NameListToQuotedString(), NameListToString(), negate_clause(), objectNamesToOids(), objectsInSchemaToOids(), OffsetVarNodes(), optimize_minmax_aggregates(), optionListToArray(), order_qual_clauses(), packGraph(), parse_basebackup_options(), parse_func_options(), parse_hba_line(), parse_ident_line(), parse_tsquery(), parseCheckAggregates(), ParseFuncOrColumn(), pathkey_is_redundant(), pathkeys_useful_for_merging(), perform_base_backup(), pg_extension_update_paths(), pg_get_indexdef_worker(), pg_listening_channels(), pg_plan_queries(), plan_cluster_use_sort(), plan_list_is_transient(), PlanCacheFuncCallback(), PlanCacheRelCallback(), PortalListGetPrimaryStmt(), PortalRunMulti(), postgres_fdw_validator(), postgresBeginForeignScan(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresGetForeignRelSize(), postgresql_fdw_validator(), PostmasterMain(), postprocess_setop_tlist(), PreCommit_Notify(), PreCommit_on_commit_actions(), 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_startup_options(), process_sublinks_mutator(), process_subquery_nestloop_params(), ProcessCopyOptions(), ProcessUtilitySlow(), prsd_headline(), pull_ands(), pull_ors(), pull_up_simple_subquery(), pull_up_simple_union_all(), pull_up_sublinks_jointree_recurse(), pull_up_sublinks_qual_recurse(), pull_up_subqueries_recurse(), push_ancestor_plan(), qual_is_pushdown_safe(), query_is_distinct_for(), 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(), refname_is_unique(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationCacheInvalidate(), ReleaseSavepoint(), RememberFsyncRequest(), remove_on_commit_action(), remove_rel_from_joinlist(), remove_rel_from_query(), remove_useless_joins(), RemoveObjects(), RemoveRelations(), reorder_function_arguments(), replace_aggs_with_params_mutator(), replace_nestloop_params_mutator(), replace_vars_in_jointree(), rescanLatestTimeLine(), ResetPlanCache(), restriction_is_constant_false(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListIU(), rewriteTargetView(), rewriteValuesRTE(), right_merge_direction(), roleNamesToIds(), 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(), 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_cheapest(), set_cte_pathlist(), set_deparse_for_query(), set_dummy_tlist_references(), set_join_references(), 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_plan_tlist(), ShutdownSQLFunction(), sort_inner_and_outer(), SPI_cursor_open_internal(), SPI_freeplan(), SPI_keepplan(), SPI_plan_is_valid(), sql_exec_error_callback(), SS_finalize_plan(), SS_process_ctes(), standard_join_search(), standard_planner(), standard_ProcessUtility(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), StoreConstraints(), storeOperators(), storeProcedures(), StoreRelCheck(), stringToQualifiedNameList(), subbuild_joinrel_joinlist(), subbuild_joinrel_restrictlist(), subquery_planner(), SyncRepGetStandbyPriority(), targetIsInSortList(), testexpr_is_hashable(), textToQualifiedNameList(), thesaurus_init(), TidListCreate(), TidQualFromExpr(), TidQualFromRestrictinfo(), tliInHistory(), tliOfPointInHistory(), tlist_matches_coltypelist(), tlist_matches_tupdesc(), tlist_member(), tlist_member_ignore_relabel(), tlist_returns_set_rows(), tlist_same_collations(), tlist_same_datatypes(), tlist_same_exprs(), tliSwitchPoint(), tokenize_inc_file(), TouchSocketFiles(), TouchSocketLockFiles(), transformAExprIn(), transformAExprOf(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformArraySubscripts(), transformAssignmentIndirection(), transformCaseExpr(), transformCoalesceExpr(), transformColumnDefinition(), transformColumnNameList(), transformConstraintAttrs(), transformCreateSchemaStmt(), transformCreateStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExpressionList(), transformFKConstraints(), transformFromClause(), transformFromClauseItem(), transformFuncCall(), transformGenericOptions(), transformGroupClause(), transformIndexConstraint(), transformIndexConstraints(), transformIndexStmt(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformLockingClause(), transformMinMaxExpr(), transformRelOptions(), transformRuleStmt(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSortClause(), transformSubLink(), transformTargetList(), transformUpdateStmt(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), translate_col_privs(), translate_sub_tlist(), trivial_subqueryscan(), TypeNameListToString(), typenameTypeMod(), unaccent_init(), UnlinkLockFiles(), update_placeholder_eval_levels(), update_proconfig_value(), use_physical_tlist(), validate_ddl_tags(), validateDomainConstraint(), ValuesNext(), view_is_auto_updatable(), XLogFileReadAnyTLI(), xmlconcat(), and xmlelement().

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

Definition at line 117 of file pg_list.h.

Referenced by _equalList(), _outList(), acquire_inherited_sample_rows(), AddRoleMems(), adjust_rowcompare_for_index(), AfterTriggerSetState(), AlterIndexNamespaces(), analyzeCTE(), ApplyExtensionUpdates(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropNotNull(), ATExecValidateConstraint(), ATPostAlterTypeCleanup(), ATSimpleRecursion(), ATTypedTableRecursion(), BuildDescFromLists(), calculate_indexes_size(), cluster(), CollationGetCollid(), CommuteRowCompareExpr(), compare_tlist_datatypes(), contain_leaky_functions_walker(), contain_mutable_functions_walker(), contain_volatile_functions_walker(), ConversionGetConid(), convert_EXISTS_to_ANY(), cost_qual_eval_walker(), create_unique_plan(), 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(), ExecOpenIndices(), 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_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(), heap_truncate(), heap_truncate_check_FKs(), 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(), OpernameGetCandidates(), OpernameGetOprid(), OpfamilynameGetOpfid(), ReassignOwnedObjects(), reindex_relation(), ReindexDatabase(), relation_has_unique_index_for(), RelationGetIndexAttrBitmap(), relationHasPrimaryKey(), 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(), StoreCatalogInheritance(), tlist_matches_coltypelist(), tlist_same_collations(), tlist_same_datatypes(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), 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 131 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 132 of file pg_list.h.

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

Definition at line 133 of file pg_list.h.

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

Definition at line 119 of file pg_list.h.

Referenced by addRangeTableEntryForValues(), AddRelationNewConstraints(), adjust_rowcompare_for_index(), AlterExtensionNamespace(), AlterOpFamilyAdd(), ApplyRetrieveRule(), assign_collations_walker(), AtEOSubXact_Namespace(), AtEOXact_Namespace(), ATExecAddConstraint(), AtSubAbort_Notify(), AtSubCommit_Notify(), BeginCopy(), btcostestimate(), build_subplan(), check_hashjoinable(), check_mergejoinable(), check_object_ownership(), check_sql_fn_retval(), choose_bitmap_and(), ChoosePortalStrategy(), clauselist_selectivity(), CommentObject(), CommuteOpExpr(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), ConvertTriggerToFK(), cost_qual_eval_walker(), count_agg_clauses_walker(), create_bitmap_subplan(), create_hashjoin_plan(), create_or_index_quals(), create_unique_path(), CreateCommandTag(), CreateExtension(), currtid_for_view(), deconstruct_recurse(), DeconstructQualifiedName(), 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(), ExecInitFunctionScan(), ExecInitHashJoin(), ExecInitModifyTable(), ExecInitSubPlan(), ExecInitValuesScan(), ExecRefreshMatView(), ExecSecLabelStmt(), ExecSetVariableStmt(), ExecuteQuery(), ExpandColumnRefStar(), expandRTE(), ExplainOneUtility(), exprCollation(), exprSetCollation(), exprType(), exprTypmod(), extract_not_arg(), extract_strong_not_arg(), FigureColnameInternal(), FillPortalStore(), find_minmax_aggs_walker(), find_param_referent(), findTargetlistEntrySQL92(), fix_indexorderby_references(), fix_indexqual_references(), flatten_join_using_qual(), FreeExecutorState(), func_get_detail(), generate_base_implied_equalities_const(), generate_join_implied_equalities_normal(), get_first_col_type(), get_from_clause_item(), get_func_expr(), get_insert_query_def(), get_join_variables(), get_leftop(), get_notclausearg(), get_object_address(), get_object_address_opcf(), get_object_address_unqualified(), get_oper_expr(), get_restriction_variable(), get_rtable_name(), get_rte_attribute_type(), get_rule_expr(), get_simple_binary_op_name(), get_sublink_expr(), get_view_query(), GetIndexOpClass(), getInsertSelectQuery(), gimme_tree(), gincost_scalararrayopexpr(), gistEmptyAllBuffers(), gistFindPath(), gistfinishsplit(), gistProcessEmptyingQueue(), 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(), isSimpleNode(), IsTidEqualAnyClause(), IsTidEqualClause(), IsTransactionExitStmtList(), IsTransactionStmtList(), LookupTypeName(), make_ands_explicit(), make_rel_from_joinlist(), make_restrictinfo_from_bitmapqual(), make_row_comparison_op(), make_ruledef(), make_viewdef(), makeRangeVarFromNameList(), match_clause_to_indexcol(), match_rowcompare_to_indexcol(), mdpostckpt(), MJExamineQuals(), negate_clause(), numeric_transform(), parse_hba_line(), parse_ident_line(), ParseFuncOrColumn(), parseTypeString(), 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(), process_duplicate_ors(), process_owned_by(), processIndirection(), processState(), processTypesSpec(), pull_up_sublinks_qual_recurse(), reconsider_full_join_clause(), reduce_outer_joins_pass2(), refresh_matview_datafill(), relation_is_updatable(), replace_aggs_with_params_mutator(), resolve_column_ref(), RewriteQuery(), rewriteTargetView(), rewriteValuesRTE(), rowcomparesel(), scalararraysel(), select_active_windows(), select_common_type(), set_plan_refs(), show_modifytable_info(), 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(), TemporalTransform(), TidListCreate(), transformAExprIn(), transformAExprNullIf(), transformAExprOf(), transformAExprOp(), transformAssignedExpr(), transformColumnDefinition(), transformColumnRef(), transformGraph(), transformIndexConstraint(), transformInsertRow(), transformSelectStmt(), TypeGetTupleDesc(), typenameTypeMod(), varbit_transform(), varchar_transform(), and view_is_auto_updatable().

#define linitial_int (   l  )     lfirst_int(list_head(l))
#define linitial_oid (   l  )     lfirst_oid(list_head(l))
#define list_make1 (   x1  )     lcons(x1, NIL)

Definition at line 142 of file pg_list.h.

Referenced by add_dummy_return(), add_predicate_to_quals(), ATAddCheckConstraint(), ATExecAddColumn(), ATExecColumnDefault(), build_aggregate_fnexprs(), build_coercion_expression(), build_minmax_path(), BuildEventTriggerCache(), buildScalarFunctionAlias(), choose_bitmap_and(), ConvertTriggerToFK(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_indexscan_plan(), create_or_index_quals(), create_tidscan_plan(), CreateRole(), deconstruct_recurse(), defGetQualifiedName(), defGetTypeName(), DefineViewRules(), deparse_context_for(), deparse_context_for_planstate(), DoCopy(), eval_const_expressions_mutator(), ExecInitSubPlan(), ExecSetVariableStmt(), expand_indexqual_opclause(), ExplainNode(), fileGetForeignPaths(), find_forced_null_vars(), find_nonnullable_vars_walker(), flatten_simple_union_all(), FunctionIsVisible(), generate_bitmap_or_paths(), generate_function_name(), generate_operator_name(), get_call_expr_arg_stable(), get_call_expr_argtype(), get_file_fdw_attribute_options(), gincostestimate(), gistFindPath(), inheritance_planner(), inline_function(), intorel_startup(), make_ands_implicit(), make_notclause(), make_op(), make_opclause(), make_restrictinfo_from_bitmapqual(), make_ruledef(), makeSimpleA_Expr(), makeTypeName(), map_sql_table_to_xmlschema(), network_prefix_quals(), OperatorIsVisible(), PerformCursorOpen(), pg_get_triggerdef_worker(), pg_rewrite_query(), plan_cluster_use_sort(), postgresGetForeignPaths(), prefix_quals(), process_duplicate_ors(), process_equivalence(), pull_up_sublinks(), readTimeLineHistory(), recordDependencyOnExpr(), recordDependencyOnSingleRelExpr(), recurse_union_children(), regoperout(), regprocout(), selectColorTrigrams(), sql_fn_post_column_ref(), standard_ProcessUtility(), subquery_planner(), TidQualFromExpr(), transformAExprIn(), transformAExprNot(), transformAssignmentIndirection(), transformColumnDefinition(), transformColumnRef(), transformCurrentOfExpr(), transformFromClauseItem(), transformIndexConstraints(), transformIndirection(), transformRuleStmt(), transformSubLink(), transformValuesClause(), and transformXmlSerialize().

#define list_make1_int (   x1  )     lcons_int(x1, NIL)
#define list_make1_oid (   x1  )     lcons_oid(x1, NIL)
#define list_make2 (   x1,
  x2 
)    lcons(x1, list_make1(x2))
#define list_make2_int (   x1,
  x2 
)    lcons_int(x1, list_make1_int(x2))

Definition at line 148 of file pg_list.h.

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

Definition at line 153 of file pg_list.h.

#define list_make3 (   x1,
  x2,
  x3 
)    lcons(x1, list_make2(x2, x3))
#define list_make3_int (   x1,
  x2,
  x3 
)    lcons_int(x1, list_make2_int(x2, x3))

Definition at line 149 of file pg_list.h.

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

Definition at line 154 of file pg_list.h.

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

Definition at line 145 of file pg_list.h.

Referenced by postgresPlanForeignModify().

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

Definition at line 150 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 155 of file pg_list.h.

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

Definition at line 136 of file pg_list.h.

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

Definition at line 137 of file pg_list.h.

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

Definition at line 114 of file pg_list.h.

Referenced by _copyList(), _outList(), add_path(), add_unique_group_var(), addKey(), adjust_rowcompare_for_index(), AlterTSDictionary(), analyzeCTE(), arrayexpr_next_fn(), 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_mergejoin_plan(), create_nestloop_plan(), DefineView(), deparseArrayRef(), deparseFuncExpr(), determineRecursiveColTypes(), do_analyze_rel(), estimate_num_groups(), examine_variable(), exec_simple_query(), exec_stmt_raise(), ExecIndexBuildScanKeys(), ExecInitJunkFilterConversion(), ExecLockRows(), ExecSecLabelStmt(), expand_inherited_tables(), expand_targetlist(), expandRTE(), ExplainExecuteQuery(), ExplainQuery(), exprTypmod(), fix_indexqual_operand(), fmgr_sql(), FormIndexDatum(), funcname_signature_string(), generate_append_tlist(), generate_setop_grouplist(), generate_setop_tlist(), generateClonedIndexStmt(), get_func_expr(), get_insert_query_def(), get_rule_expr(), grouping_planner(), insert_ordered_oid(), insert_ordered_unique_oid(), intorel_startup(), 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(), parse_hba_line(), parse_ident_line(), ParseFuncOrColumn(), perform_base_backup(), pg_get_indexdef_worker(), pg_listening_channels(), PortalRunMulti(), postprocess_setop_tlist(), print_expr(), print_function_arguments(), print_pathkeys(), printSubscripts(), ProcedureCreate(), process_startup_options(), ProcessUtilitySlow(), 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(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), tlist_matches_coltypelist(), tlist_matches_tupdesc(), tlist_same_collations(), tlist_same_datatypes(), transformAssignmentIndirection(), transformInsertRow(), transformSetOperationStmt(), transformSubLink(), transformUpdateStmt(), and transformWithClause().

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

Definition at line 124 of file pg_list.h.

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

Definition at line 125 of file pg_list.h.

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

Definition at line 128 of file pg_list.h.

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

Definition at line 129 of file pg_list.h.

#define NIL   ((List *) NULL)

Definition at line 69 of file pg_list.h.

Referenced by add_dummy_return(), add_path(), add_path_precheck(), add_predicate_to_quals(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addTargetToSortList(), AfterTriggerSetState(), AggregateCreate(), AlterDomainDefault(), AlterOpFamilyAdd(), analyzeCTETargetList(), appendTypeNameToBuffer(), Async_Unlisten(), Async_UnlistenAll(), AsyncExistsPendingNotify(), asyncQueueUnregister(), AtAbort_Notify(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtCommit_Notify(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAlterColumnGenericOptions(), ATExecColumnDefault(), ATExecGenericOptions(), ATExecSetRelOptions(), ATPrepAlterColumnType(), ATRewriteCatalogs(), ATRewriteTables(), build_base_rel_tlists(), build_index_paths(), build_joinrel_joinlist(), build_joinrel_restrictlist(), build_minmax_path(), build_paths_for_OR(), build_subplan(), BuildCachedPlan(), buildRelationAliases(), buildScalarFunctionAlias(), CatalogIndexInsert(), check_equivalence_delay(), check_outerjoin_delay(), check_partial_indexes(), CheckAttributeNamesTypes(), checkInsertTargets(), CheckSelectLocking(), checkWellFormedRecursion(), checkWellFormedRecursionWalker(), choose_hashed_setop(), ChooseIndexName(), ChoosePortalStrategy(), CommandIsReadOnly(), compute_index_stats(), compute_return_type(), ConstructTupleDescriptor(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_prep_stmt_params(), CopyFromInsertBatch(), CopyGetAttnums(), cost_subplan(), count_agg_clauses_walker(), create_append_plan(), create_bitmap_subplan(), create_index_paths(), create_join_plan(), create_or_index_quals(), create_plan(), create_scan_plan(), create_toast_table(), create_unique_path(), CreateCommandTag(), CreateExtension(), CreateLockFile(), CreateProceduralLanguage(), CreateTrigger(), current_schema(), DefineAggregate(), DefineDomain(), DefineIndex(), DefineOpClass(), DefineOperator(), DefineQueryRewrite(), DefineRange(), DefineRelation(), DefineType(), DefineView(), DefineVirtualRelation(), deparse_context_for(), deparseArrayExpr(), DiscardAll(), do_analyze_rel(), domainAddConstraint(), dump_dynexecute(), dump_dynfors(), dump_if(), dump_open(), dump_return_query(), estimate_num_groups(), estimate_path_cost_size(), eval_const_expressions_mutator(), EvalPlanQualStart(), EventTriggerCommonSetup(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), examine_variable(), exec_execute_message(), exec_parse_message(), exec_simple_check_plan(), exec_stmt_raise(), exec_stmts(), ExecAlterDefaultPrivilegesStmt(), ExecARDeleteTriggers(), ExecASDeleteTriggers(), ExecASInsertTriggers(), ExecASTruncateTriggers(), ExecASUpdateTriggers(), ExecBuildProjectionInfo(), ExecEvalArrayRef(), ExecHashJoin(), ExecHashSubPlan(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitRecursiveUnion(), ExecInitSubPlan(), ExecInitWindowAgg(), ExecInsertIndexTuples(), ExecMergeJoin(), ExecNestLoop(), ExecReScanSetParamPlan(), ExecSecLabelStmt(), ExecSubPlan(), ExecuteGrantStmt(), ExecuteTruncate(), ExplainModifyTarget(), ExplainPrintPlan(), ExplainQuery(), exprTypmod(), extract_lateral_references(), file_acquire_sample_rows(), fileBeginForeignScan(), fileGetForeignPaths(), fileGetForeignPlan(), fileReScanForeignScan(), final_cost_mergejoin(), find_mergeclauses_for_pathkeys(), find_minmax_aggs_walker(), find_nonnullable_vars_walker(), find_param_referent(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), fireRIRrules(), flatten_set_variable_args(), flatten_simple_union_all(), flatten_tlist(), FormIndexDatum(), func_get_detail(), FuncnameGetCandidates(), FunctionIsVisible(), generate_bitmap_or_paths(), generate_function_name(), generate_nonunion_plan(), GenerateTypeDependencies(), get_actual_variable_range(), get_agg_expr(), get_available_versions_for_extension(), get_basic_select_query(), get_delete_query_def(), get_file_fdw_attribute_options(), get_from_clause_item(), get_index_paths(), get_insert_query_def(), get_join_index_paths(), get_leftop(), get_name_for_var_field(), get_op_btree_interpretation(), get_query_def(), get_relation_info(), get_rule_expr(), get_select_query_def(), get_ts_parser_func(), get_ts_template_func(), get_update_query_def(), get_variable(), get_windowfunc_expr(), get_with_clause(), GetIndexOpClass(), gimme_tree(), gincostestimate(), gistEmptyAllBuffers(), gistFindPath(), gistProcessEmptyingQueue(), GrantRole(), grouping_planner(), has_indexed_join_quals(), has_unique_index(), has_useful_pathkeys(), heap_truncate_check_FKs(), identify_update_path(), IndexBuildHeapScan(), IndexCheckExclusion(), inheritance_planner(), initialize_mergeclause_eclasses(), InitPlan(), insert_event_trigger_tuple(), insert_ordered_oid(), insert_ordered_unique_oid(), InsertRule(), interpret_AS_clause(), is_simple_subquery(), is_strict_saop(), isLockedRefname(), IsThereFunctionInNamespace(), join_is_removable(), join_search_one_level(), lappend(), lappend_int(), lappend_oid(), lcons(), lcons_int(), lcons_oid(), list_concat(), list_copy(), list_copy_tail(), list_delete_first(), list_difference(), list_difference_int(), list_difference_oid(), list_difference_ptr(), list_intersection(), list_nth_cell(), load_hba(), lookup_agg_function(), LookupAggNameTypeNames(), LookupFuncName(), LookupTypeName(), make_ands_explicit(), make_join_rel(), make_modifytable(), make_new_heap(), make_restrictinfo_from_bitmapqual(), make_ruledef(), make_sort(), make_subplan(), make_union_unique(), make_viewdef(), makeDependencyGraph(), makeDependencyGraphWalker(), makeRangeConstructors(), mark_dummy_rel(), match_unsorted_outer(), MatchNamedCall(), mdpostckpt(), merge_clump(), MergeAttributes(), objectNamesToOids(), optimize_minmax_aggregates(), parse_ident_line(), ParseFuncOrColumn(), parseTypeString(), pathkeys_useful_for_merging(), pathkeys_useful_for_ordering(), PerformCursorOpen(), pg_extension_update_paths(), pg_get_constraintdef_worker(), pg_get_indexdef_worker(), pg_get_triggerdef_worker(), plan_cluster_use_sort(), plan_set_operations(), PlanCacheRelCallback(), PLy_abort_open_subtransactions(), PLy_subtransaction_exit(), PopOverrideSearchPath(), PortalDefineQuery(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresGetForeignRelSize(), postgresPlanForeignModify(), PostmasterMain(), PreCommit_Notify(), PreCommit_on_commit_actions(), predicate_implied_by(), predicate_refuted_by(), preprocess_groupclause(), preprocess_minmax_aggregates(), print_function_arguments(), ProcedureCreate(), process_duplicate_ors(), process_equivalence(), ProcessCompletedNotifies(), ProcessCopyOptions(), ProcessIncomingNotify(), processState(), processTypesSpec(), ProcessUtilitySlow(), pull_up_simple_subquery(), pull_up_sublinks_qual_recurse(), PushOverrideSearchPath(), query_planner(), QueryRewrite(), recomputeNamespacePath(), recurse_set_operations(), reduce_outer_joins(), reduce_outer_joins_pass2(), regprocedurein(), regprocin(), regprocout(), relation_has_unique_index_for(), RelationGetIndexAttrBitmap(), rename_constraint_internal(), renameatt_internal(), RewriteQuery(), rewriteRuleAction(), select_active_windows(), select_common_type(), select_mergejoin_clauses(), select_rtable_names_for_explain(), sepgsql_xact_callback(), set_append_rel_pathlist(), set_cheapest(), set_dummy_rel_pathlist(), set_plan_refs(), set_relation_column_names(), set_subquery_pathlist(), SetDefaultACLsInSchemas(), SetForwardFsyncRequests(), show_plan_tlist(), show_qual(), spgWalk(), SPI_cursor_open_internal(), sql_fn_post_column_ref(), SS_process_ctes(), standard_ExecutorStart(), standard_join_search(), standard_planner(), standard_qp_callback(), StoreAttrDefault(), StoreCatalogInheritance(), stringToQualifiedNameList(), textToQualifiedNameList(), tokenize_file(), transformArrayExpr(), transformAssignmentSubscripts(), transformColumnDefinition(), transformColumnRef(), transformCreateStmt(), transformDeclareCursorStmt(), transformFKConstraints(), transformFromClauseItem(), transformGraph(), transformIndexConstraint(), transformIndexConstraints(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformJoinUsingClause(), transformLockingClause(), transformRelOptions(), transformReturningList(), transformRuleStmt(), transformSelectStmt(), transformSetOperationTree(), transformValuesClause(), transformWindowFuncCall(), transformWithClause(), translate_sub_tlist(), TriggerEnabled(), trivial_subqueryscan(), try_hashjoin_path(), TryReuseForeignKey(), TypeGetTupleDesc(), typenameTypeMod(), update_mergeclause_eclasses(), UpdateIndexRelation(), UpdateRangeTableOfViewParse(), vacuum(), validate_index_heapscan(), view_is_auto_updatable(), XactHasExportedSnapshots(), and xmlelement().


Typedef Documentation

typedef struct List List
typedef struct ListCell ListCell

Definition at line 43 of file pg_list.h.


Function Documentation

List* lappend ( List list,
void *  datum 
)

Definition at line 131 of file list.c.

References Assert, check_list_invariants, IsPointerList, lfirst, 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_dummy_return(), add_eq_member(), add_join_clause_to_rels(), add_lateral_info(), add_placeholders_to_base_rels(), add_placeholders_to_joinrel(), add_to_flat_tlist(), add_unique_group_var(), add_vars_to_targetlist(), addArc(), addFamilyMember(), addKey(), addKeyToQueue(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addRTEtoQuery(), addTargetToGroupList(), addTargetToSortList(), adjust_inherited_tlist(), AlterTSDictionary(), analyzeCTETargetList(), applyLockingClause(), ApplyRetrieveRule(), assign_param_for_placeholdervar(), assign_param_for_var(), Async_Notify(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAlterColumnType(), ATExecDropInherit(), ATGetQueueEntry(), ATPostAlterTypeParse(), ATPrepAlterColumnType(), ATPrepCmd(), btcostestimate(), build_aggregate_fnexprs(), build_coercion_expression(), build_index_pathkeys(), build_index_paths(), build_index_tlist(), build_join_rel(), build_joinrel_tlist(), build_physical_tlist(), build_relation_tlist(), build_subplan(), BuildEventTriggerCache(), buildRelationAliases(), cached_scansel(), calc_joinrel_size_estimate(), check_partial_indexes(), 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(), ComputeIndexAttrs(), convert_ANY_sublink_to_join(), convert_EXISTS_to_ANY(), convert_subquery_pathkeys(), ConvertTriggerToFK(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_index_paths(), create_indexscan_plan(), create_join_clause(), create_merge_append_plan(), create_nestloop_path(), create_nestloop_plan(), create_unique_path(), create_unique_plan(), CreateLockFile(), database_to_xmlschema_internal(), deconstruct_recurse(), DefineRelation(), DefineSequence(), DefineTSDictionary(), DefineVirtualRelation(), deparseParam(), deparseVar(), deserialize_deflist(), determineRecursiveColTypes(), distribute_qual_to_rels(), distribute_restrictinfo_to_rels(), drop_indexable_join_clauses(), eval_const_expressions_mutator(), EvalPlanQualStart(), examine_parameter_list(), Exec_ListenCommit(), ExecAllocTableSlot(), ExecBuildProjectionInfo(), ExecEvalXml(), ExecGetTriggerResultRel(), ExecInitExpr(), ExecInitHashJoin(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitNode(), ExecInitSubPlan(), ExecuteGrantStmt(), ExecuteTruncate(), expand_indexqual_conditions(), expand_inherited_rtentry(), expand_targetlist(), expandRelAttrs(), ExpandRowReference(), expandRTE(), expandTupleDesc(), ExportSnapshot(), expression_tree_mutator(), extract_actual_clauses(), extract_actual_join_clauses(), extract_lateral_references(), extractRemainingColumns(), file_fdw_validator(), find_duplicate_ors(), 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_join_alias_vars_mutator(), flatten_join_using_qual(), flatten_simple_union_all(), 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_agg_expr(), get_all_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_func_expr(), get_index_paths(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_op_btree_interpretation(), get_relation_constraints(), get_sortgrouplist_exprs(), get_switched_clauses(), get_tlist_exprs(), getState(), gistFindPath(), gistfixsplit(), gistplacetopage(), hash_inner_and_outer(), heap_truncate(), index_check_primary_key(), inheritance_planner(), init_execution_state(), init_sql_fcache(), InitPlan(), 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(), log_incomplete_deletion(), log_incomplete_split(), make_canonical_pathkey(), make_inh_translation_list(), make_inner_pathkeys_for_merge(), make_modifytable(), make_pathkeys_for_sortclauses(), make_rel_from_joinlist(), make_restrictinfo_from_bitmapqual(), make_restrictinfos_from_actual_clauses(), make_row_comparison_op(), make_setop_translation_list(), make_sub_restrictinfos(), make_subplanTargetList(), make_windowInputTargetList(), makeDependencyGraphWalker(), match_join_clauses_to_index(), match_pathkeys_to_index(), matchLocks(), merge_clump(), MergeAttributes(), mergeStates(), negate_clause(), network_prefix_quals(), next_field_expand(), nodeRead(), order_qual_clauses(), parse_hba_line(), ParseFuncOrColumn(), perform_base_backup(), pg_plan_queries(), postgresAddForeignUpdateTargets(), postgresGetForeignPaths(), postgresGetForeignPlan(), prefix_quals(), 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_sublinks_jointree_recurse(), pull_up_sublinks_qual_recurse(), pull_up_union_leaf_queries(), pull_var_clause_walker(), pull_vars_walker(), push_ancestor_plan(), pushIncompleteSplit(), QueryRewrite(), queue_listen(), range_table_mutator(), record_plan_function_dependency(), reduce_outer_joins_pass1(), register_label_provider(), relation_excluded_by_constraints(), relation_has_unique_index_for(), RelationCacheInvalidate(), RememberFsyncRequest(), remove_rel_from_joinlist(), reorder_function_arguments(), replace_nestloop_params_mutator(), replace_outer_agg(), resetSpGistScanOpaque(), 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_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_plan_tlist(), show_sort_keys_common(), simplify_and_arguments(), simplify_or_arguments(), SplitDirectoriesString(), SplitIdentifierString(), SS_make_initplan_from_plan(), SS_process_ctes(), StandbyAcquireAccessExclusiveLock(), stringToQualifiedNameList(), subquery_planner(), textToQualifiedNameList(), tokenize_file(), tokenize_inc_file(), transformAExprIn(), transformAggregateCall(), transformAlterTableStmt(), transformArrayExpr(), transformArraySubscripts(), transformAssignmentIndirection(), transformCaseExpr(), transformCoalesceExpr(), transformColumnDefinition(), transformCreateSchemaStmt(), transformCreateStmt(), transformDistinctClause(), transformDistinctOnClause(), transformExpressionList(), transformFKConstraints(), transformFkeyGetPrimaryKey(), transformFromClause(), transformFromClauseItem(), transformFuncCall(), transformGenericOptions(), transformGroupClause(), transformIndexConstraint(), transformIndexConstraints(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformMinMaxExpr(), transformOfType(), transformRowExpr(), transformRuleStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableConstraint(), transformTableLikeClause(), transformTargetList(), transformValuesClause(), transformWindowDefinitions(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), untransformRelOptions(), and xmlelement().

{
    Assert(IsPointerList(list));

    if (list == NIL)
        list = new_list(T_List);
    else
        new_tail_cell(list);

    lfirst(list->tail) = datum;
    check_list_invariants(list);
    return list;
}

ListCell* lappend_cell ( List list,
ListCell prev,
void *  datum 
)

Definition at line 212 of file list.c.

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

Referenced by add_path(), and merge_clump().

{
    ListCell   *new_cell;

    Assert(IsPointerList(list));

    new_cell = add_new_cell(list, prev);
    lfirst(new_cell) = datum;
    check_list_invariants(list);
    return new_cell;
}

ListCell* lappend_cell_int ( List list,
ListCell prev,
int  datum 
)

Definition at line 225 of file list.c.

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

{
    ListCell   *new_cell;

    Assert(IsIntegerList(list));

    new_cell = add_new_cell(list, prev);
    lfirst_int(new_cell) = datum;
    check_list_invariants(list);
    return new_cell;
}

ListCell* lappend_cell_oid ( List list,
ListCell prev,
Oid  datum 
)

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

{
    ListCell   *new_cell;

    Assert(IsOidList(list));

    new_cell = add_new_cell(list, prev);
    lfirst_oid(new_cell) = datum;
    check_list_invariants(list);
    return new_cell;
}

List* lappend_int ( List list,
int  datum 
)
List* lappend_oid ( List list,
Oid  datum 
)

Definition at line 167 of file list.c.

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

Referenced by addRangeTableEntryForFunction(), adjust_rowcompare_for_index(), AfterTriggerSetState(), analyzeCTETargetList(), ApplyExtensionUpdates(), assign_collations_walker(), ATExecAlterColumnType(), check_functional_grouping(), CommuteRowCompareExpr(), convert_EXISTS_to_ANY(), create_empty_extension(), create_unique_path(), CreateExtension(), do_autovacuum(), EventTriggerCommonSetup(), ExecAlterDefaultPrivilegesStmt(), ExecInitHashJoin(), ExecInsertIndexTuples(), ExecuteGrantStmt(), ExecuteTruncate(), extract_query_dependencies_walker(), find_all_inheritors(), find_inheritance_children(), find_typed_table_dependencies(), fix_expr_common(), get_mergejoin_opfamilies(), get_rel_oids(), getOwnedSequences(), getRelationsInNamespace(), heap_truncate_check_FKs(), list_append_unique_oid(), list_concat_unique_oid(), list_difference_oid(), list_union_oid(), make_row_comparison_op(), MergeAttributes(), nodeRead(), objectNamesToOids(), objectsInSchemaToOids(), PreCommit_on_commit_actions(), query_to_oid_list(), recomputeNamespacePath(), reindex_relation(), ReindexDatabase(), roleNamesToIds(), set_plan_references(), transformSetOperationTree(), transformValuesClause(), and typeInheritsFrom().

{
    Assert(IsOidList(list));

    if (list == NIL)
        list = new_list(T_OidList);
    else
        new_tail_cell(list);

    lfirst_oid(list->tail) = datum;
    check_list_invariants(list);
    return list;
}

List* lcons ( void *  datum,
List list 
)
List* lcons_int ( int  datum,
List list 
)

Definition at line 280 of file list.c.

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

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

{
    Assert(IsIntegerList(list));

    if (list == NIL)
        list = new_list(T_IntList);
    else
        new_head_cell(list);

    lfirst_int(list->head) = datum;
    check_list_invariants(list);
    return list;
}

List* lcons_oid ( Oid  datum,
List list 
)
List* list_append_unique ( List list,
void *  datum 
)

Definition at line 939 of file list.c.

References lappend(), and list_member().

{
    if (list_member(list, datum))
        return list;
    else
        return lappend(list, datum);
}

List* list_append_unique_int ( List list,
int  datum 
)

Definition at line 964 of file list.c.

References lappend_int(), and list_member_int().

{
    if (list_member_int(list, datum))
        return list;
    else
        return lappend_int(list, datum);
}

List* list_append_unique_oid ( List list,
Oid  datum 
)

Definition at line 976 of file list.c.

References lappend_oid(), and list_member_oid().

Referenced by is_admin_of_role(), map_sql_typecoll_to_xmlschema_types(), roles_has_privs_of(), and roles_is_member_of().

{
    if (list_member_oid(list, datum))
        return list;
    else
        return lappend_oid(list, datum);
}

List* list_append_unique_ptr ( List list,
void *  datum 
)

Definition at line 952 of file list.c.

References lappend(), and list_member_ptr().

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

{
    if (list_member_ptr(list, datum))
        return list;
    else
        return lappend(list, datum);
}

List* list_concat ( List list1,
List list2 
)

Definition at line 324 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(), ATPostAlterTypeParse(), AtSubCommit_Notify(), build_joinrel_restrictlist(), build_paths_for_OR(), check_partial_indexes(), check_sql_fn_retval(), choose_bitmap_and(), convert_EXISTS_sublink_to_join(), cost_index(), create_bitmap_subplan(), create_index_paths(), create_join_plan(), create_or_index_quals(), create_scan_plan(), deconstruct_recurse(), DefineRelation(), expand_indexqual_conditions(), expand_inherited_rtentry(), ExpandAllTables(), fileBeginForeignScan(), fileGetOptions(), find_forced_null_vars(), find_indexpath_quals(), find_mergeclauses_for_pathkeys(), find_nonnullable_vars_walker(), fmgr_sql_validator(), generate_bitmap_or_paths(), generate_join_implied_equalities(), generate_join_implied_equalities_normal(), generate_union_plan(), get_baserel_parampathinfo(), 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(), make_restrictinfo_from_bitmapqual(), mergeStates(), 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(), TidQualFromExpr(), transformAExprIn(), transformAlterTableStmt(), transformCreateSchemaStmt(), transformCreateStmt(), transformExpressionList(), transformFromClause(), transformFromClauseItem(), and transformTargetList().

{
    if (list1 == NIL)
        return list2;
    if (list2 == NIL)
        return list1;
    if (list1 == list2)
        elog(ERROR, "cannot list_concat() a list to itself");

    Assert(list1->type == list2->type);

    list1->length += list2->length;
    list1->tail->next = list2->head;
    list1->tail = list2->tail;

    check_list_invariants(list1);
    return list1;
}

List* list_concat_unique ( List list1,
List list2 
)

Definition at line 995 of file list.c.

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

Referenced by create_bitmap_subplan(), and make_restrictinfo_from_bitmapqual().

{
    ListCell   *cell;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    foreach(cell, list2)
    {
        if (!list_member(list1, lfirst(cell)))
            list1 = lappend(list1, lfirst(cell));
    }

    check_list_invariants(list1);
    return list1;
}

List* list_concat_unique_int ( List list1,
List list2 
)

Definition at line 1038 of file list.c.

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

{
    ListCell   *cell;

    Assert(IsIntegerList(list1));
    Assert(IsIntegerList(list2));

    foreach(cell, list2)
    {
        if (!list_member_int(list1, lfirst_int(cell)))
            list1 = lappend_int(list1, lfirst_int(cell));
    }

    check_list_invariants(list1);
    return list1;
}

List* list_concat_unique_oid ( List list1,
List list2 
)

Definition at line 1059 of file list.c.

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

{
    ListCell   *cell;

    Assert(IsOidList(list1));
    Assert(IsOidList(list2));

    foreach(cell, list2)
    {
        if (!list_member_oid(list1, lfirst_oid(cell)))
            list1 = lappend_oid(list1, lfirst_oid(cell));
    }

    check_list_invariants(list1);
    return list1;
}

List* list_concat_unique_ptr ( List list1,
List list2 
)

Definition at line 1017 of file list.c.

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

Referenced by make_agg_subplan().

{
    ListCell   *cell;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    foreach(cell, list2)
    {
        if (!list_member_ptr(list1, lfirst(cell)))
            list1 = lappend(list1, lfirst(cell));
    }

    check_list_invariants(list1);
    return list1;
}

List* list_copy ( const List list  ) 

Definition at line 1137 of file list.c.

References check_list_invariants, ListCell::data, List::head, List::length, new_list(), ListCell::next, NIL, 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_minmax_path(), build_paths_for_OR(), build_subplan(), check_partial_indexes(), choose_bitmap_and(), copyObject(), CopyOverrideSearchPath(), cost_index(), create_scan_plan(), does_not_exist_skipping(), expression_tree_mutator(), fetch_search_path(), find_indexpath_quals(), generate_bitmap_or_paths(), get_eclass_for_sort_expr(), get_object_address_attribute(), get_object_address_relobject(), get_parameterized_baserel_size(), get_query_def(), get_switched_clauses(), 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(), make_restrictinfo_from_bitmapqual(), make_subplanTargetList(), match_unsorted_outer(), process_matched_tle(), process_owned_by(), PushOverrideSearchPath(), recomputeNamespacePath(), RelationGetIndexList(), RelationSetIndexList(), remove_rel_from_query(), roles_has_privs_of(), roles_is_member_of(), select_outer_pathkeys_for_merge(), set_plan_refs(), SetReindexPending(), simplify_and_arguments(), simplify_or_arguments(), sort_inner_and_outer(), transformWithClause(), and truncate_useless_pathkeys().

{
    List       *newlist;
    ListCell   *newlist_prev;
    ListCell   *oldlist_cur;

    if (oldlist == NIL)
        return NIL;

    newlist = new_list(oldlist->type);
    newlist->length = oldlist->length;

    /*
     * Copy over the data in the first cell; new_list() has already allocated
     * the head cell itself
     */
    newlist->head->data = oldlist->head->data;

    newlist_prev = newlist->head;
    oldlist_cur = oldlist->head->next;
    while (oldlist_cur)
    {
        ListCell   *newlist_cur;

        newlist_cur = (ListCell *) palloc(sizeof(*newlist_cur));
        newlist_cur->data = oldlist_cur->data;
        newlist_prev->next = newlist_cur;

        newlist_prev = newlist_cur;
        oldlist_cur = oldlist_cur->next;
    }

    newlist_prev->next = NULL;
    newlist->tail = newlist_prev;

    check_list_invariants(newlist);
    return newlist;
}

List* list_copy_tail ( const List list,
int  nskip 
)

Definition at line 1180 of file list.c.

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

Referenced by addRangeTableEntryForJoin(), find_expr_references_walker(), get_name_for_var_field(), inheritance_planner(), and ParseFuncOrColumn().

{
    List       *newlist;
    ListCell   *newlist_prev;
    ListCell   *oldlist_cur;

    if (nskip < 0)
        nskip = 0;              /* would it be better to elog? */

    if (oldlist == NIL || nskip >= oldlist->length)
        return NIL;

    newlist = new_list(oldlist->type);
    newlist->length = oldlist->length - nskip;

    /*
     * Skip over the unwanted elements.
     */
    oldlist_cur = oldlist->head;
    while (nskip-- > 0)
        oldlist_cur = oldlist_cur->next;

    /*
     * Copy over the data in the first remaining cell; new_list() has already
     * allocated the head cell itself
     */
    newlist->head->data = oldlist_cur->data;

    newlist_prev = newlist->head;
    oldlist_cur = oldlist_cur->next;
    while (oldlist_cur)
    {
        ListCell   *newlist_cur;

        newlist_cur = (ListCell *) palloc(sizeof(*newlist_cur));
        newlist_cur->data = oldlist_cur->data;
        newlist_prev->next = newlist_cur;

        newlist_prev = newlist_cur;
        oldlist_cur = oldlist_cur->next;
    }

    newlist_prev->next = NULL;
    newlist->tail = newlist_prev;

    check_list_invariants(newlist);
    return newlist;
}

List* list_delete ( List list,
void *  datum 
)

Definition at line 570 of file list.c.

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

{
    ListCell   *cell;
    ListCell   *prev;

    Assert(IsPointerList(list));
    check_list_invariants(list);

    prev = NULL;
    foreach(cell, list)
    {
        if (equal(lfirst(cell), datum))
            return list_delete_cell(list, cell, prev);

        prev = cell;
    }

    /* Didn't find a match: return the list unmodified */
    return list;
}

List* list_delete_cell ( List list,
ListCell cell,
ListCell prev 
)

Definition at line 531 of file list.c.

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

Referenced by add_path(), addKey(), AlterTSDictionary(), AtEOSubXact_on_commit_actions(), AtEOXact_on_commit_actions(), choose_bitmap_and(), create_nestloop_plan(), Exec_UnlistenCommit(), fileGetOptions(), 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(), and transformGenericOptions().

{
    check_list_invariants(list);
    Assert(prev != NULL ? lnext(prev) == cell : list_head(list) == cell);

    /*
     * If we're about to delete the last node from the list, free the whole
     * list instead and return NIL, which is the only valid representation of
     * a zero-length list.
     */
    if (list->length == 1)
    {
        list_free(list);
        return NIL;
    }

    /*
     * Otherwise, adjust the necessary list links, deallocate the particular
     * node we have just removed, and return the list we were given.
     */
    list->length--;

    if (prev)
        prev->next = cell->next;
    else
        list->head = cell->next;

    if (list->tail == cell)
        list->tail = prev;

    pfree(cell);
    return list;
}

List* list_delete_first ( List list  ) 
List* list_delete_int ( List list,
int  datum 
)

Definition at line 616 of file list.c.

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

{
    ListCell   *cell;
    ListCell   *prev;

    Assert(IsIntegerList(list));
    check_list_invariants(list);

    prev = NULL;
    foreach(cell, list)
    {
        if (lfirst_int(cell) == datum)
            return list_delete_cell(list, cell, prev);

        prev = cell;
    }

    /* Didn't find a match: return the list unmodified */
    return list;
}

List* list_delete_oid ( List list,
Oid  datum 
)

Definition at line 639 of file list.c.

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

Referenced by RemoveReindexPending().

{
    ListCell   *cell;
    ListCell   *prev;

    Assert(IsOidList(list));
    check_list_invariants(list);

    prev = NULL;
    foreach(cell, list)
    {
        if (lfirst_oid(cell) == datum)
            return list_delete_cell(list, cell, prev);

        prev = cell;
    }

    /* Didn't find a match: return the list unmodified */
    return list;
}

List* list_delete_ptr ( List list,
void *  datum 
)
List* list_difference ( const List list1,
const List list2 
)

Definition at line 835 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(), and process_duplicate_ors().

{
    const ListCell *cell;
    List       *result = NIL;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    if (list2 == NIL)
        return list_copy(list1);

    foreach(cell, list1)
    {
        if (!list_member(list2, lfirst(cell)))
            result = lappend(result, lfirst(cell));
    }

    check_list_invariants(result);
    return result;
}

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

Definition at line 886 of file list.c.

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

{
    const ListCell *cell;
    List       *result = NIL;

    Assert(IsIntegerList(list1));
    Assert(IsIntegerList(list2));

    if (list2 == NIL)
        return list_copy(list1);

    foreach(cell, list1)
    {
        if (!list_member_int(list2, lfirst_int(cell)))
            result = lappend_int(result, lfirst_int(cell));
    }

    check_list_invariants(result);
    return result;
}

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

Definition at line 911 of file list.c.

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

{
    const ListCell *cell;
    List       *result = NIL;

    Assert(IsOidList(list1));
    Assert(IsOidList(list2));

    if (list2 == NIL)
        return list_copy(list1);

    foreach(cell, list1)
    {
        if (!list_member_oid(list2, lfirst_oid(cell)))
            result = lappend_oid(result, lfirst_oid(cell));
    }

    check_list_invariants(result);
    return result;
}

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

Definition at line 861 of file list.c.

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

Referenced by cost_index(), and create_bitmap_scan_plan().

{
    const ListCell *cell;
    List       *result = NIL;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    if (list2 == NIL)
        return list_copy(list1);

    foreach(cell, list1)
    {
        if (!list_member_ptr(list2, lfirst(cell)))
            result = lappend(result, lfirst(cell));
    }

    check_list_invariants(result);
    return result;
}

void list_free ( List list  ) 

Definition at line 1110 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(), build_base_rel_tlists(), calc_joinrel_size_estimate(), calculate_indexes_size(), check_datestyle(), check_log_destination(), check_search_path(), check_synchronous_standby_names(), check_temp_tablespaces(), choose_bitmap_and(), compute_semi_anti_join_factors(), CopyFrom(), CopyFromInsertBatch(), CreateExtension(), current_schema(), current_schemas(), distribute_qual_to_rels(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), ExecInsert(), ExecOpenIndices(), ExecResetTupleTable(), ExecUpdate(), extract_lateral_references(), find_all_inheritors(), find_expr_references_walker(), fix_placeholder_input_needed_levels(), flatten_tlist(), freeScanStack(), generate_base_implied_equalities_no_const(), get_relation_info(), is_admin_of_role(), list_delete_cell(), load_libraries(), make_pathkeys_for_window(), make_subplanTargetList(), make_windowInputTargetList(), mark_placeholders_in_expr(), OverrideSearchPathMatchesCurrent(), pop_ancestor_plan(), PopOverrideSearchPath(), PostmasterMain(), prepare_sort_from_pathkeys(), PrepareTempTablespaces(), preprocess_targetlist(), qual_is_pushdown_safe(), recomputeNamespacePath(), RelationCacheInvalidate(), RelationDestroyRelation(), RelationGetIndexAttrBitmap(), RelationGetOidIndex(), relationHasPrimaryKey(), RelationSetIndexList(), roles_has_privs_of(), roles_is_member_of(), sepgsql_dml_privileges(), stringToQualifiedNameList(), SyncRepGetStandbyPriority(), textToQualifiedNameList(), TidQualFromExpr(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformValuesClause(), triggered_change_notification(), typeInheritsFrom(), and vac_open_indexes().

{
    list_free_private(list, false);
}

void list_free_deep ( List list  ) 

Definition at line 1124 of file list.c.

References Assert, IsPointerList, and list_free_private().

Referenced by checkSharedDependencies(), Exec_UnlistenAllCommit(), get_btree_test_op(), gistbufferinginserttuples(), PostmasterMain(), rescanLatestTimeLine(), StartReplication(), and XLogSend().

{
    /*
     * A "deep" free operation only makes sense on a list of pointers.
     */
    Assert(IsPointerList(list));
    list_free_private(list, true);
}

ListCell* list_head ( const List l  ) 

Referenced by add_path(), add_unique_group_var(), addKey(), adjust_rowcompare_for_index(), AlterTSDictionary(), analyzeCTE(), appendTypeNameToBuffer(), arrayexpr_startup_fn(), 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_mergejoin_plan(), create_nestloop_plan(), DefineView(), deparseArrayRef(), deparseOpExpr(), determineRecursiveColTypes(), do_analyze_rel(), dump_getdiag(), estimate_num_groups(), examine_variable(), exec_stmt_raise(), ExecIndexBuildScanKeys(), ExecInitJunkFilterConversion(), ExecSecLabelStmt(), expand_inherited_tables(), expand_targetlist(), expandRTE(), exprTypmod(), fix_indexqual_operand(), flatten_set_variable_args(), FormIndexDatum(), funcname_signature_string(), generate_append_tlist(), generate_setop_grouplist(), generate_setop_tlist(), generateClonedIndexStmt(), get_insert_query_def(), get_rule_expr(), insert_ordered_oid(), insert_ordered_unique_oid(), intorel_startup(), join_search_one_level(), list_delete_cell(), list_delete_first(), list_free_private(), list_startup_fn(), LookupFuncNameTypeNames(), make_append(), make_inner_pathkeys_for_merge(), make_modifytable(), makeDependencyGraphWalker(), match_index_to_operand(), merge_clump(), NameListToQuotedString(), NameListToString(), parse_hba_line(), parse_ident_line(), ParseFuncOrColumn(), pg_get_indexdef_worker(), pg_listening_channels(), postprocess_setop_tlist(), PreCommit_Notify(), print_function_arguments(), printSubscripts(), ProcedureCreate(), process_startup_options(), 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(), SetClientEncoding(), sort_inner_and_outer(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), tlist_matches_coltypelist(), tlist_matches_tupdesc(), tlist_same_collations(), tlist_same_datatypes(), transformAssignedExpr(), transformInsertRow(), transformSetOperationStmt(), transformSubLink(), transformUpdateStmt(), and TypeNameListToString().

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

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

{
    List       *result;
    const ListCell *cell;

    if (list1 == NIL || list2 == NIL)
        return NIL;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    result = NIL;
    foreach(cell, list1)
    {
        if (list_member(list2, lfirst(cell)))
            result = lappend(result, lfirst(cell));
    }

    check_list_invariants(result);
    return result;
}

int list_length ( const List l  ) 

Referenced by _copyList(), _copyMergeJoin(), _outMergeJoin(), _SPI_execute_plan(), acquire_inherited_sample_rows(), add_function_defaults(), add_to_flat_tlist(), addRangeTableEntryForCTE(), addRangeTableEntryForJoin(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), AddRelationNewConstraints(), AddRoleMems(), adjust_appendrel_attrs_mutator(), adjust_inherited_tlist(), adjust_rowcompare_for_index(), AlterExtensionNamespace(), analyzeCTETargetList(), ApplyRetrieveRule(), ATAddForeignKeyConstraint(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAlterColumnType(), AtSubAbort_Notify(), AtSubCommit_Notify(), AtSubStart_Notify(), BeginCopy(), BeginCopyFrom(), build_simple_rel(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), BuildDescForRelation(), BuildDescFromLists(), buildRelationAliases(), buildScalarFunctionAlias(), buildSubPlanHash(), check_hashjoinable(), check_mergejoinable(), check_selective_binary_conversion(), check_temp_tablespaces(), check_ungrouped_columns_walker(), CheckIndexCompatible(), choose_bitmap_and(), choose_hashed_distinct(), choose_hashed_grouping(), choose_hashed_setop(), ChoosePortalStrategy(), clauselist_selectivity(), CommentObject(), CommuteOpExpr(), ComputeIndexAttrs(), connect_pg_server(), consider_index_join_clauses(), consider_index_join_outer_rels(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), convert_subquery_pathkeys(), convert_testexpr_mutator(), cookConstraint(), CopyOneRowTo(), CopyTo(), count_agg_clauses_walker(), count_rowexpr_columns(), create_bitmap_subplan(), create_ctescan_plan(), create_hashjoin_plan(), create_merge_append_path(), create_mergejoin_plan(), create_or_index_quals(), create_tidscan_plan(), create_unique_path(), create_unique_plan(), CreateExtension(), CreateTrigger(), current_schemas(), currtid_for_view(), deconstruct_recurse(), DeconstructQualifiedName(), DefineAggregate(), DefineCollation(), DefineDomain(), DefineIndex(), DefineQueryRewrite(), DefineVirtualRelation(), DelRoleMems(), deparseDistinctExpr(), deparseOpExpr(), deparseScalarArrayOpExpr(), do_analyze_rel(), does_not_exist_skipping(), domainAddConstraint(), eclass_useful_for_merging(), EnumValuesCreate(), estimate_array_length(), eval_const_expressions_mutator(), EvalPlanQualBegin(), EvalPlanQualStart(), EvaluateParams(), examine_parameter_list(), examine_simple_variable(), exec_eval_using_params(), exec_parse_message(), exec_simple_check_plan(), exec_simple_query(), exec_simple_recheck_plan(), ExecCreateTableAs(), ExecEvalArray(), ExecEvalXml(), ExecHashTableCreate(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitAlternativeSubPlan(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapOr(), ExecInitExpr(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitSubPlan(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecMakeTableFunctionResult(), ExecOpenIndices(), ExecRefreshMatView(), ExecScanSubPlan(), ExecTargetListLength(), ExecTypeFromExprList(), ExecuteQuery(), ExecuteTruncate(), expand_function_arguments(), expand_indexqual_conditions(), expand_inherited_rtentry(), expand_inherited_tables(), ExpandColumnRefStar(), ExpandIndirectionStar(), expandRecordVariable(), expandRTE(), expandTupleDesc(), ExplainMemberNodes(), ExplainNode(), ExplainOneUtility(), ExplainPreScanMemberNodes(), ExportSnapshot(), exprIsLengthCoercion(), extract_grouping_cols(), extract_grouping_ops(), extractRemainingColumns(), filter_list_to_array(), finalize_plan(), find_expr_references_walker(), find_join_rel(), find_minmax_aggs_walker(), findTargetlistEntrySQL92(), fireRIRrules(), fix_indexorderby_references(), fix_indexqual_references(), 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(), generate_nonunion_plan(), genericcostestimate(), geqo_eval(), get_available_versions_for_extension(), get_call_expr_arg_stable(), get_call_expr_argtype(), get_column_info_for_window(), get_func_expr(), get_join_variables(), get_name_for_var_field(), get_object_address(), get_object_address_attribute(), get_object_address_opcf(), get_object_address_relobject(), get_object_address_unqualified(), get_oper_expr(), get_query_def(), 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_simple_binary_op_name(), get_variable(), get_view_query(), get_windowfunc_expr(), GetIndexOpClass(), getInsertSelectQuery(), GetRTEByRangeTablePosn(), getTokenTypes(), gimme_tree(), gincostestimate(), gistbufferinginserttuples(), gistfinishsplit(), gistRelocateBuildBuffersOnSplit(), grouping_planner(), has_relevant_eclass_joinclause(), hash_ok_operator(), 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(), interval_transform(), is_dummy_plan(), is_safe_append_member(), is_strict_saop(), IsTidEqualAnyClause(), IsTidEqualClause(), IsTransactionExitStmtList(), IsTransactionStmtList(), length(), list_truncate(), LookupAggNameTypeNames(), LookupFuncNameTypeNames(), LookupTypeName(), make_ands_explicit(), make_modifytable(), make_recursive_union(), make_rel_from_joinlist(), make_restrictinfo_from_bitmapqual(), make_restrictinfo_internal(), make_row_comparison_op(), make_row_distinct_op(), make_ruledef(), make_setop(), make_sort_from_groupcols(), make_sort_from_sortclauses(), make_subplanTargetList(), make_union_unique(), make_unique(), make_viewdef(), make_windowInputTargetList(), MakeConfigurationMapping(), makeRangeVarFromNameList(), markRTEForSelectPriv(), markTargetListOrigin(), match_unsorted_outer(), MatchNamedCall(), MergeAttributes(), MJExamineQuals(), NextCopyFrom(), numeric_transform(), order_qual_clauses(), parse_tsquery(), ParseFuncOrColumn(), parseTypeString(), pathkeys_useful_for_ordering(), perform_base_backup(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), PLy_abort_open_subtransactions(), PLy_procedure_call(), PortalListGetPrimaryStmt(), PortalRunMulti(), postgresAddForeignUpdateTargets(), postgresBeginForeignModify(), postgresBeginForeignScan(), 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(), pull_up_simple_subquery(), pull_up_simple_union_all(), 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(), relation_has_unique_index_for(), RemoveRelations(), reorder_function_arguments(), resolve_column_ref(), RewriteQuery(), rewriteRuleAction(), rewriteTargetListUD(), rewriteTargetView(), rewriteValuesRTE(), scalararraysel(), SearchCatCacheList(), select_outer_pathkeys_for_merge(), SendCopyBegin(), set_cte_pathlist(), set_deparse_for_query(), set_join_column_names(), set_plan_references(), set_plan_refs(), set_relation_column_names(), set_simple_column_names(), set_subquery_pathlist(), set_using_names(), set_values_size_estimates(), setTargetTable(), setup_simple_rel_arrays(), show_plan_tlist(), show_sort_keys_common(), show_upper_qual(), simplify_boolean_equality(), sort_inner_and_outer(), SPI_cursor_open_internal(), SPI_is_cursor_plan(), SPI_plan_get_cached_plan(), sql_fn_post_column_ref(), SS_make_initplan_from_plan(), SS_process_ctes(), standard_join_search(), standard_planner(), standard_qp_callback(), StoreRelCheck(), subquery_planner(), TemporalTransform(), TidListCreate(), tlist_same_exprs(), tokenize_file(), trackDroppedObjectsNeeded(), transformAExprIn(), transformAExprOp(), transformColumnDefinition(), transformColumnRef(), transformFromClauseItem(), transformIndexConstraint(), transformIndexStmt(), transformInsertRow(), transformInsertStmt(), transformRuleStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTableLikeClause(), transformValuesClause(), transformWindowFuncCall(), transformWithClause(), trivial_subqueryscan(), truncate_useless_pathkeys(), tsvector_update_trigger(), TypeGetTupleDesc(), typenameTypeMod(), vac_open_indexes(), vacuum(), ValuesNext(), varbit_transform(), varchar_transform(), and view_is_auto_updatable().

bool list_member ( const List list,
const void *  datum 
)
bool list_member_int ( const List list,
int  datum 
)
bool list_member_oid ( const List list,
Oid  datum 
)
bool list_member_ptr ( const List list,
const void *  datum 
)
void* list_nth ( const List list,
int  n 
)
int list_nth_int ( const List list,
int  n 
)

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

{
    Assert(IsIntegerList(list));
    return lfirst_int(list_nth_cell(list, n));
}

Oid list_nth_oid ( const List list,
int  n 
)

Definition at line 435 of file list.c.

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

Referenced by get_rte_attribute_type().

{
    Assert(IsOidList(list));
    return lfirst_oid(list_nth_cell(list, n));
}

ListCell* list_tail ( List l  ) 
List* list_truncate ( List list,
int  new_size 
)

Definition at line 353 of file list.c.

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

Referenced by adjust_rowcompare_for_index(), does_not_exist_skipping(), ExpandIndirectionStar(), geqo_eval(), get_object_address_attribute(), get_object_address_relobject(), match_unsorted_outer(), ParseFuncOrColumn(), process_owned_by(), transformFromClauseItem(), transformSetOperationStmt(), and truncate_useless_pathkeys().

{
    ListCell   *cell;
    int         n;

    if (new_size <= 0)
        return NIL;             /* truncate to zero length */

    /* If asked to effectively extend the list, do nothing */
    if (new_size >= list_length(list))
        return list;

    n = 1;
    foreach(cell, list)
    {
        if (n == new_size)
        {
            cell->next = NULL;
            list->tail = cell;
            list->length = new_size;
            check_list_invariants(list);
            return list;
        }
        n++;
    }

    /* keep the compiler quiet; never reached */
    Assert(false);
    return list;
}

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

Definition at line 700 of file list.c.

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

Referenced by AddRelationNewConstraints(), and process_duplicate_ors().

{
    List       *result;
    const ListCell *cell;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    result = list_copy(list1);
    foreach(cell, list2)
    {
        if (!list_member(result, lfirst(cell)))
            result = lappend(result, lfirst(cell));
    }

    check_list_invariants(result);
    return result;
}

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

Definition at line 747 of file list.c.

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

{
    List       *result;
    const ListCell *cell;

    Assert(IsIntegerList(list1));
    Assert(IsIntegerList(list2));

    result = list_copy(list1);
    foreach(cell, list2)
    {
        if (!list_member_int(result, lfirst_int(cell)))
            result = lappend_int(result, lfirst_int(cell));
    }

    check_list_invariants(result);
    return result;
}

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

Definition at line 770 of file list.c.

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

{
    List       *result;
    const ListCell *cell;

    Assert(IsOidList(list1));
    Assert(IsOidList(list2));

    result = list_copy(list1);
    foreach(cell, list2)
    {
        if (!list_member_oid(result, lfirst_oid(cell)))
            result = lappend_oid(result, lfirst_oid(cell));
    }

    check_list_invariants(result);
    return result;
}

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

Definition at line 724 of file list.c.

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

{
    List       *result;
    const ListCell *cell;

    Assert(IsPointerList(list1));
    Assert(IsPointerList(list2));

    result = list_copy(list1);
    foreach(cell, list2)
    {
        if (!list_member_ptr(result, lfirst(cell)))
            result = lappend(result, lfirst(cell));
    }

    check_list_invariants(result);
    return result;
}