PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/heaptoast.h"
#include "access/htup_details.h"
#include "access/tupdesc_details.h"
#include "access/xact.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "nodes/nodeFuncs.h"
#include "storage/bufmgr.h"
#include "utils/builtins.h"
#include "utils/expandeddatum.h"
#include "utils/lsyscache.h"
#include "utils/typcache.h"
Go to the source code of this file.
Variables | |
const TupleTableSlotOps | TTSOpsVirtual |
const TupleTableSlotOps | TTSOpsHeapTuple |
const TupleTableSlotOps | TTSOpsMinimalTuple |
const TupleTableSlotOps | TTSOpsBufferHeapTuple |
TupOutputState* begin_tup_output_tupdesc | ( | DestReceiver * | dest, |
TupleDesc | tupdesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 2342 of file execTuples.c.
References CMD_SELECT, generate_unaccent_rules::dest, TupOutputState::dest, MakeSingleTupleTableSlot(), palloc(), _DestReceiver::rStartup, and TupOutputState::slot.
Referenced by CreateReplicationSlot(), ExecuteCallStmt(), ExplainQuery(), IdentifySystem(), ReadReplicationSlot(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
Definition at line 2158 of file execTuples.c.
References assign_record_type_typmod(), TupleDescData::tdtypeid, and TupleDescData::tdtypmod.
Referenced by aclexplode(), brin_metapage_info(), bt_page_items_bytea(), bt_page_items_internal(), exec_eval_datum(), ExecEvalWholeRowVar(), ExecInitExprRec(), ExecInitFunctionScan(), get_expr_result_type(), hash_bitmap_info(), hash_metapage_info(), hash_page_items(), hash_page_stats(), init_sql_fcache(), InitMaterializedSRF(), injection_points_stats_fixed(), pg_buffercache_pages(), pg_get_catalog_foreign_keys(), pg_get_publication_tables(), pg_get_sequence_data(), pg_lock_status(), pg_prepared_xact(), pg_stat_file(), pg_stat_get_archiver(), pg_stat_get_backend_subxact(), pg_stat_get_replication_slot(), pg_stat_get_subscription_stats(), pg_stat_get_wal(), pg_stats_ext_mcvlist_items(), pg_visibility_tupdesc(), pg_walfile_name_offset(), pgstathashindex(), PLy_output_setup_record(), setup_firstcall(), ssl_extension_info(), test_enc_conversion(), test_predtest(), and TupleDescGetAttInMetadata().
HeapTuple BuildTupleFromCStrings | ( | AttInMetadata * | attinmeta, |
char ** | values | ||
) |
Definition at line 2222 of file execTuples.c.
References AttInMetadata::attinfuncs, AttInMetadata::attioparams, AttInMetadata::atttypmods, heap_form_tuple(), i, InputFunctionCall(), TupleDescData::natts, palloc(), pfree(), AttInMetadata::tupdesc, TupleDescAttr, and values.
Referenced by bt_metap(), bt_multi_page_stats(), bt_page_stats_internal(), build_pgstattuple_type(), build_tuplestore_recursively(), crosstab(), dblink_get_pkey(), get_crosstab_tuplestore(), libpqrcv_processTuples(), materializeResult(), pg_get_keywords(), pg_get_multixact_members(), pgp_armor_headers(), pgrowlocks(), pgstatindex_impl(), pltcl_build_tuple_result(), prs_process_call(), show_all_settings(), storeRow(), ts_process_call(), tt_process_call(), and xpath_table().
void do_text_output_multiline | ( | TupOutputState * | tstate, |
const char * | txt | ||
) |
Definition at line 2390 of file execTuples.c.
References cstring_to_text_with_len(), DatumGetPointer(), do_tup_output(), len, pfree(), PointerGetDatum(), and values.
Referenced by ExplainQuery().
void do_tup_output | ( | TupOutputState * | tstate, |
const Datum * | values, | ||
const bool * | isnull | ||
) |
Definition at line 2362 of file execTuples.c.
References TupOutputState::dest, ExecClearTuple(), ExecStoreVirtualTuple(), TupleDescData::natts, _DestReceiver::receiveSlot, TupOutputState::slot, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, and values.
Referenced by CreateReplicationSlot(), do_text_output_multiline(), IdentifySystem(), ReadReplicationSlot(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), and StartReplication().
void end_tup_output | ( | TupOutputState * | tstate | ) |
Definition at line 2420 of file execTuples.c.
References TupOutputState::dest, ExecDropSingleTupleTableSlot(), pfree(), _DestReceiver::rShutdown, and TupOutputState::slot.
Referenced by CreateReplicationSlot(), ExecuteCallStmt(), ExplainQuery(), IdentifySystem(), ReadReplicationSlot(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
TupleTableSlot* ExecAllocTableSlot | ( | List ** | tupleTable, |
TupleDesc | desc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1258 of file execTuples.c.
References lappend(), and MakeTupleTableSlot().
Referenced by ExecInitExtraTupleSlot(), ExecInitIndexOnlyScan(), ExecInitResultSlot(), ExecInitScanTupleSlot(), and find_hash_columns().
Definition at line 2037 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by ExecInitJunkFilter(), PlanCacheComputeResultDesc(), and PortalStart().
void ExecDropSingleTupleTableSlot | ( | TupleTableSlot * | slot | ) |
Definition at line 1341 of file execTuples.c.
References Assert, ExecClearTuple(), IsA, pfree(), TupleTableSlotOps::release, ReleaseTupleDesc, TTS_FIXED, TupleTableSlot::tts_isnull, TupleTableSlot::tts_ops, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by acquire_sample_rows(), AfterTriggerFreeQuery(), afterTriggerInvokeEvents(), ATRewriteTable(), CatalogIndexInsert(), check_default_partition_contents(), check_exclusion_or_unique_constraint(), check_publications(), check_publications_origin(), compute_expr_stats(), compute_index_stats(), CopyMultiInsertBufferCleanup(), copyTemplateDependencies(), DefineTSConfiguration(), DoCopyTo(), end_tup_output(), EnumValuesCreate(), ExecCleanupTupleRouting(), ExecEndIncrementalSort(), ExecEndModifyTable(), fetch_remote_table_info(), fetch_table_list(), FindConflictTuple(), freestate_cluster(), get_actual_variable_range(), get_rel_sync_entry(), heap_entry_is_visible(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), hypothetical_dense_rank_final(), IndexCheckExclusion(), InsertPgAttributeTuples(), make_build_data(), MakeConfigurationMapping(), pgoutput_change(), recordMultipleDependencies(), RelationFindReplTupleSeq(), RI_Initial_Check(), RunFromStore(), systable_endscan(), systable_endscan_ordered(), table_index_fetch_tuple_check(), tstoreShutdownReceiver(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
HeapTuple ExecFetchSlotHeapTuple | ( | TupleTableSlot * | slot, |
bool | materialize, | ||
bool * | shouldFree | ||
) |
Definition at line 1731 of file execTuples.c.
References Assert, TupleTableSlotOps::copy_heap_tuple, TupleTableSlotOps::get_heap_tuple, TupleTableSlotOps::materialize, TTS_EMPTY, and TupleTableSlot::tts_ops.
Referenced by AfterTriggerExecute(), apply_returning_filter(), CatalogTuplesMultiInsertWithInfo(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecFetchSlotHeapTupleDatum(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), heap_multi_insert(), heapam_relation_copy_for_cluster(), heapam_tuple_complete_speculative(), heapam_tuple_insert(), heapam_tuple_insert_speculative(), heapam_tuple_update(), systable_getnext(), systable_getnext_ordered(), systable_recheck_tuple(), and validateForeignKeyConstraint().
Datum ExecFetchSlotHeapTupleDatum | ( | TupleTableSlot * | slot | ) |
Definition at line 1810 of file execTuples.c.
References ExecFetchSlotHeapTuple(), heap_copy_tuple_as_datum(), pfree(), and TupleTableSlot::tts_tupleDescriptor.
Referenced by ExecMakeFunctionResultSet(), and postquel_get_single_result().
MinimalTuple ExecFetchSlotMinimalTuple | ( | TupleTableSlot * | slot, |
bool * | shouldFree | ||
) |
Definition at line 1779 of file execTuples.c.
References Assert, TupleTableSlotOps::copy_minimal_tuple, TupleTableSlotOps::get_minimal_tuple, TTS_EMPTY, and TupleTableSlot::tts_ops.
Referenced by ExecHashJoinImpl(), ExecHashSkewTableInsert(), ExecHashTableInsert(), ExecParallelHashJoinPartitionOuter(), ExecParallelHashTableInsert(), ExecParallelHashTableInsertCurrentBatch(), hashagg_spill_tuple(), and tqueueReceiveSlot().
void ExecForceStoreHeapTuple | ( | HeapTuple | tuple, |
TupleTableSlot * | slot, | ||
bool | shouldFree | ||
) |
Definition at line 1556 of file execTuples.c.
References ExecClearTuple(), ExecMaterializeSlot(), ExecStoreHeapTuple(), ExecStoreVirtualTuple(), heap_copytuple(), heap_deform_tuple(), MemoryContextSwitchTo(), pfree(), TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TTS_IS_BUFFERTUPLE, TTS_IS_HEAPTUPLE, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by agg_retrieve_direct(), ExecARDeleteTriggers(), ExecARUpdateTriggers(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecDelete(), ExecIRDeleteTriggers(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), ExecMergeMatched(), ExecModifyTable(), IndexNextWithReorder(), IndexOnlyNext(), and store_returning_result().
void ExecForceStoreMinimalTuple | ( | MinimalTuple | mtup, |
TupleTableSlot * | slot, | ||
bool | shouldFree | ||
) |
Definition at line 1599 of file execTuples.c.
References ExecClearTuple(), ExecMaterializeSlot(), ExecStoreVirtualTuple(), heap_deform_tuple(), MINIMAL_TUPLE_OFFSET, pfree(), HeapTupleData::t_data, HeapTupleData::t_len, MinimalTupleData::t_len, TTS_IS_MINIMALTUPLE, TupleTableSlot::tts_isnull, tts_minimal_store_tuple(), TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by ExecHashJoinGetSavedTuple(), ExecParallelHashJoinNewBatch(), and ExecParallelHashJoinOuterGetTuple().
TupleTableSlot* ExecInitExtraTupleSlot | ( | EState * | estate, |
TupleDesc | tupledesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1918 of file execTuples.c.
References EState::es_tupleTable, and ExecAllocTableSlot().
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update(), build_pertrans_for_aggref(), ExecGetReturningSlot(), ExecGetTriggerNewSlot(), ExecGetTriggerOldSlot(), ExecInitAgg(), ExecInitFunctionScan(), ExecInitGather(), ExecInitHashJoin(), ExecInitLimit(), ExecInitMergeJoin(), ExecInitNullTupleSlot(), ExecInitSubPlan(), ExecInitWholeRowVar(), ExecInitWindowAgg(), gather_merge_setup(), and InitPlan().
TupleTableSlot* ExecInitNullTupleSlot | ( | EState * | estate, |
TupleDesc | tupType, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1934 of file execTuples.c.
References ExecInitExtraTupleSlot(), and ExecStoreAllNullTuple().
Referenced by ExecInitHashJoin(), ExecInitMergeJoin(), and ExecInitNestLoop().
void ExecInitResultSlot | ( | PlanState * | planstate, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1866 of file execTuples.c.
References EState::es_tupleTable, ExecAllocTableSlot(), PlanState::ps_ResultTupleDesc, PlanState::ps_ResultTupleSlot, PlanState::resultops, PlanState::resultopsfixed, PlanState::resultopsset, and PlanState::state.
Referenced by ExecConditionalAssignProjectionInfo(), and ExecInitResultTupleSlotTL().
void ExecInitResultTupleSlotTL | ( | PlanState * | planstate, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1886 of file execTuples.c.
References ExecInitResultSlot(), and ExecInitResultTypeTL().
Referenced by ExecInitAgg(), ExecInitAppend(), ExecInitCustomScan(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitMaterial(), ExecInitMemoize(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitProjectSet(), ExecInitResult(), ExecInitSetOp(), ExecInitSort(), ExecInitUnique(), and ExecInitWindowAgg().
void ExecInitResultTypeTL | ( | PlanState * | planstate | ) |
Definition at line 1842 of file execTuples.c.
References ExecTypeFromTL(), PlanState::plan, PlanState::ps_ResultTupleDesc, and Plan::targetlist.
Referenced by ExecInitBitmapHeapScan(), ExecInitCteScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitLimit(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitNamedTuplestoreScan(), ExecInitRecursiveUnion(), ExecInitResultTupleSlotTL(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitValuesScan(), and ExecInitWorkTableScan().
void ExecInitScanTupleSlot | ( | EState * | estate, |
ScanState * | scanstate, | ||
TupleDesc | tupledesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1898 of file execTuples.c.
References EState::es_tupleTable, ExecAllocTableSlot(), ScanState::ps, PlanState::scandesc, PlanState::scanops, PlanState::scanopsfixed, PlanState::scanopsset, and ScanState::ss_ScanTupleSlot.
Referenced by ExecCreateScanSlotFromOuterPlan(), ExecInitBitmapHeapScan(), ExecInitCteScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitNamedTuplestoreScan(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitValuesScan(), and ExecInitWorkTableScan().
void ExecResetTupleTable | ( | List * | tupleTable, |
bool | shouldFree | ||
) |
Definition at line 1278 of file execTuples.c.
References ExecClearTuple(), lfirst_node, list_free(), pfree(), TupleTableSlotOps::release, ReleaseTupleDesc, TTS_FIXED, TupleTableSlot::tts_isnull, TupleTableSlot::tts_ops, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by afterTriggerInvokeEvents(), CopyFrom(), EvalPlanQualEnd(), ExecEndPlan(), and finish_edata().
void ExecSetSlotDescriptor | ( | TupleTableSlot * | slot, |
TupleDesc | tupdesc | ||
) |
Definition at line 1376 of file execTuples.c.
References Assert, ExecClearTuple(), MemoryContextAlloc(), TupleDescData::natts, pfree(), PinTupleDesc, ReleaseTupleDesc, TTS_FIXED, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by ExecAssignScanType(), ExecInitJunkFilter(), and ExecInitJunkFilterConversion().
TupleTableSlot* ExecStoreAllNullTuple | ( | TupleTableSlot * | slot | ) |
Definition at line 1663 of file execTuples.c.
References Assert, ExecClearTuple(), ExecStoreVirtualTuple(), MemSet, TupleDescData::natts, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by ATRewriteTable(), ExecDelete(), ExecInitNullTupleSlot(), get_returning_data(), heapam_scan_bitmap_next_tuple(), and prepare_projection_slot().
TupleTableSlot* ExecStoreBufferHeapTuple | ( | HeapTuple | tuple, |
TupleTableSlot * | slot, | ||
Buffer | buffer | ||
) |
Definition at line 1479 of file execTuples.c.
References Assert, BufferIsValid(), elog, ERROR, HeapTupleData::t_tableOid, tts_buffer_heap_store_tuple(), TTS_IS_BUFFERTUPLE, TupleTableSlot::tts_tableOid, TupleTableSlot::tts_tupleDescriptor, and unlikely.
Referenced by heap_getnextslot(), heap_getnextslot_tidrange(), heapam_index_build_range_scan(), heapam_index_fetch_tuple(), heapam_scan_analyze_next_tuple(), heapam_scan_bitmap_next_tuple(), and heapam_scan_sample_next_tuple().
TupleTableSlot* ExecStoreHeapTuple | ( | HeapTuple | tuple, |
TupleTableSlot * | slot, | ||
bool | shouldFree | ||
) |
Definition at line 1439 of file execTuples.c.
References Assert, elog, ERROR, HeapTupleData::t_tableOid, tts_heap_store_tuple(), TTS_IS_HEAPTUPLE, TupleTableSlot::tts_tableOid, TupleTableSlot::tts_tupleDescriptor, and unlikely.
Referenced by CatalogIndexInsert(), comparetup_cluster_tiebreak(), compute_expr_stats(), compute_index_stats(), ExecForceStoreHeapTuple(), ExecuteCallStmt(), get_returning_data(), heapam_index_validate_scan(), make_build_data(), pgoutput_change(), postgresIterateForeignScan(), setop_retrieve_direct(), and tts_heap_copyslot().
void ExecStoreHeapTupleDatum | ( | Datum | data, |
TupleTableSlot * | slot | ||
) |
Definition at line 1693 of file execTuples.c.
References data, DatumGetHeapTupleHeader, ExecClearTuple(), ExecStoreVirtualTuple(), heap_deform_tuple(), HeapTupleHeaderGetDatumLength, HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by EvalPlanQualFetchRowMark().
TupleTableSlot* ExecStoreMinimalTuple | ( | MinimalTuple | mtup, |
TupleTableSlot * | slot, | ||
bool | shouldFree | ||
) |
Definition at line 1533 of file execTuples.c.
References Assert, elog, ERROR, TTS_IS_MINIMALTUPLE, tts_minimal_store_tuple(), TupleTableSlot::tts_tupleDescriptor, and unlikely.
Referenced by agg_refill_hash_table(), agg_retrieve_hash_table_in_memory(), ExecMemoize(), ExecParallelScanHashBucket(), ExecParallelScanHashTableForUnmatched(), ExecScanHashBucket(), ExecScanHashTableForUnmatched(), findPartialMatch(), gather_getnext(), gather_merge_readnext(), MemoizeHash_equal(), prepare_probe_slot(), setop_retrieve_hash_table(), tts_minimal_copyslot(), TupleHashTableHash_internal(), TupleHashTableMatch(), tuplesort_gettupleslot(), and tuplestore_gettupleslot().
TupleTableSlot* ExecStorePinnedBufferHeapTuple | ( | HeapTuple | tuple, |
TupleTableSlot * | slot, | ||
Buffer | buffer | ||
) |
Definition at line 1505 of file execTuples.c.
References Assert, BufferIsValid(), elog, ERROR, HeapTupleData::t_tableOid, tts_buffer_heap_store_tuple(), TTS_IS_BUFFERTUPLE, TupleTableSlot::tts_tableOid, TupleTableSlot::tts_tupleDescriptor, and unlikely.
Referenced by heapam_fetch_row_version(), and heapam_tuple_lock().
TupleTableSlot* ExecStoreVirtualTuple | ( | TupleTableSlot * | slot | ) |
Definition at line 1639 of file execTuples.c.
References Assert, TupleDescData::natts, TTS_EMPTY, TTS_FLAG_EMPTY, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, and TupleTableSlot::tts_tupleDescriptor.
Referenced by agg_retrieve_hash_table_in_memory(), apply_returning_filter(), ATRewriteTable(), CopyFrom(), copyTemplateDependencies(), DefineTSConfiguration(), do_tup_output(), EnumValuesCreate(), ExecComputeStoredGenerated(), ExecEvalAggOrderedTransTuple(), ExecEvalPreOrderedDistinctMulti(), ExecFilterJunk(), ExecForceStoreHeapTuple(), ExecForceStoreMinimalTuple(), ExecProjectSRF(), ExecSort(), ExecStoreAllNullTuple(), ExecStoreHeapTupleDatum(), execute_attr_map_slot(), fileIterateForeignScan(), FunctionNext(), hashagg_spill_tuple(), hypothetical_dense_rank_final(), hypothetical_rank_common(), InsertPgAttributeTuples(), MakeConfigurationMapping(), ordered_set_transition_multi(), pgoutput_row_filter(), prepare_hash_slot(), prepare_probe_slot(), recordMultipleDependencies(), RI_Initial_Check(), RI_PartitionRemove_Check(), slot_modify_data(), slot_store_data(), StoreIndexTuple(), and ValuesNext().
Definition at line 2084 of file execTuples.c.
References CreateTemplateTupleDesc(), exprCollation(), exprType(), exprTypmod(), lfirst, list_length(), TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecInitExprRec(), ExecInitMemoize(), and ExecInitValuesScan().
Definition at line 2025 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by build_pertrans_for_aggref(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitIndexOnlyScan(), ExecInitResultTypeTL(), ExecInitSubPlan(), find_hash_columns(), and ordered_set_startup().
Definition at line 2043 of file execTuples.c.
References CreateTemplateTupleDesc(), ExecCleanTargetListLength(), ExecTargetListLength(), TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), len, lfirst, TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecCleanTypeFromTL(), and ExecTypeFromTL().
Definition at line 2117 of file execTuples.c.
References Assert, lfirst, namestrcpy(), TupleDescData::natts, strVal, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and TupleDescAttr.
Referenced by ExecEvalWholeRowVar(), and ExecInitExprRec().
Datum HeapTupleHeaderGetDatum | ( | HeapTupleHeader | tuple | ) |
Definition at line 2311 of file execTuples.c.
References HeapTupleHeaderGetDatumLength, HeapTupleHeaderGetTypeId, HeapTupleHeaderGetTypMod, HeapTupleHeaderHasExternal, lookup_rowtype_tupdesc(), PointerGetDatum(), ReleaseTupleDesc, and toast_flatten_tuple_to_datum().
Referenced by HeapTupleGetDatum(), populate_composite(), and populate_recordset_record().
TupleTableSlot* MakeSingleTupleTableSlot | ( | TupleDesc | tupdesc, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1325 of file execTuples.c.
References MakeTupleTableSlot().
Referenced by afterTriggerInvokeEvents(), ATRewriteTable(), begin_tup_output_tupdesc(), BuildTupleHashTableExt(), CatalogIndexInsert(), check_publications(), check_publications_origin(), compute_expr_stats(), compute_index_stats(), copyTemplateDependencies(), DefineTSConfiguration(), EnumValuesCreate(), ExecInitIncrementalSort(), ExecInitJunkFilter(), ExecInitJunkFilterConversion(), ExecInitMemoize(), ExecInitPartitionDispatchInfo(), ExecInsert(), ExecPrepareTuplestoreResult(), fetch_remote_table_info(), fetch_table_list(), GetAfterTriggersStoreSlot(), heapam_index_validate_scan(), hypothetical_dense_rank_final(), init_sql_fcache(), init_tuple_slot(), InsertPgAttributeTuples(), make_build_data(), MakeConfigurationMapping(), ordered_set_startup(), pgoutput_row_filter(), recordMultipleDependencies(), RI_Initial_Check(), RI_PartitionRemove_Check(), RunFromStore(), synchronize_slots(), table_slot_create(), tstoreStartupReceiver(), tuplesort_begin_cluster(), and validate_remote_info().
TupleTableSlot* MakeTupleTableSlot | ( | TupleDesc | tupleDesc, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1199 of file execTuples.c.
References TupleTableSlotOps::base_slot_size, CurrentMemoryContext, TupleTableSlotOps::init, MAXALIGN, TupleDescData::natts, palloc0(), PinTupleDesc, TTS_FLAG_EMPTY, TTS_FLAG_FIXED, TupleTableSlot::tts_flags, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_nvalid, TupleTableSlot::tts_ops, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, and TupleTableSlot::type.
Referenced by ExecAllocTableSlot(), ExecConstraints(), ExecPartitionCheckEmitError(), ExecWithCheckOptions(), MakeSingleTupleTableSlot(), and pgoutput_change().
|
static |
Definition at line 1008 of file execTuples.c.
References att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull(), attnum, fetchatt, for(), HeapTupleHasNulls, HeapTupleHeaderGetNatts, Min, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, TupleTableSlot::tts_isnull, TupleTableSlot::tts_nvalid, TTS_SLOW, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, TupleDescAttr, and values.
Referenced by tts_buffer_heap_getsomeattrs(), tts_heap_getsomeattrs(), and tts_minimal_getsomeattrs().
void slot_getmissingattrs | ( | TupleTableSlot * | slot, |
int | startAttNum, | ||
int | lastAttNum | ||
) |
Definition at line 1955 of file execTuples.c.
References AttrMissing::am_present, AttrMissing::am_value, TupleDescData::constr, TupleConstr::missing, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by slot_getsomeattrs_int().
void slot_getsomeattrs_int | ( | TupleTableSlot * | slot, |
int | attnum | ||
) |
Definition at line 1989 of file execTuples.c.
References Assert, attnum, elog, ERROR, TupleTableSlotOps::getsomeattrs, TupleDescData::natts, slot_getmissingattrs(), TupleTableSlot::tts_nvalid, TupleTableSlot::tts_ops, TupleTableSlot::tts_tupleDescriptor, and unlikely.
Referenced by slot_getsomeattrs().
|
static |
Definition at line 719 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::buffer, BufferIsValid(), heap_freetuple(), InvalidBuffer, ItemPointerSetInvalid(), ReleaseBuffer(), TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, and TupleTableSlot::tts_tid.
|
static |
Definition at line 916 of file execTuples.c.
References Assert, heap_copytuple(), tts_buffer_heap_materialize(), and TTS_EMPTY.
|
static |
Definition at line 929 of file execTuples.c.
References Assert, minimal_tuple_from_heap_tuple(), tts_buffer_heap_materialize(), and TTS_EMPTY.
|
static |
Definition at line 861 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::buffer, BufferIsValid(), ExecClearTuple(), ExecCopySlotHeapTuple(), MemoryContextSwitchTo(), tts_buffer_heap_store_tuple(), TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_ops, and TTS_SHOULDFREE.
|
static |
Definition at line 903 of file execTuples.c.
References Assert, tts_buffer_heap_materialize(), and TTS_EMPTY.
|
static |
Definition at line 749 of file execTuples.c.
References Assert, slot_deform_heap_tuple(), and TTS_EMPTY.
|
static |
Definition at line 759 of file execTuples.c.
References Assert, attnum, ereport, errcode(), errmsg(), ERROR, heap_getsysattr(), TTS_EMPTY, and TupleTableSlot::tts_tupleDescriptor.
|
static |
Definition at line 709 of file execTuples.c.
|
static |
Definition at line 802 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::buffer, BufferIsValid(), heap_copytuple(), heap_form_tuple(), InvalidBuffer, likely, MemoryContextSwitchTo(), ReleaseBuffer(), TTS_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by tts_buffer_heap_copy_heap_tuple(), tts_buffer_heap_copy_minimal_tuple(), and tts_buffer_heap_get_heap_tuple().
|
static |
Definition at line 714 of file execTuples.c.
|
inlinestatic |
Definition at line 942 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::buffer, BufferIsValid(), heap_freetuple(), IncrBufferRefCount(), ReleaseBuffer(), HeapTupleData::t_self, TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, and TupleTableSlot::tts_tid.
Referenced by ExecStoreBufferHeapTuple(), ExecStorePinnedBufferHeapTuple(), and tts_buffer_heap_copyslot().
|
static |
Definition at line 779 of file execTuples.c.
References Assert, ereport, errcode(), errmsg(), ERROR, HeapTupleHeaderGetRawXmin, TransactionIdIsCurrentTransactionId(), and TTS_EMPTY.
|
static |
Definition at line 326 of file execTuples.c.
References heap_freetuple(), ItemPointerSetInvalid(), HeapTupleTableSlot::off, TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tid, and HeapTupleTableSlot::tuple.
Referenced by tts_heap_store_tuple().
|
static |
Definition at line 463 of file execTuples.c.
References Assert, heap_copytuple(), TTS_EMPTY, tts_heap_materialize(), and HeapTupleTableSlot::tuple.
|
static |
Definition at line 475 of file execTuples.c.
References minimal_tuple_from_heap_tuple(), tts_heap_materialize(), and HeapTupleTableSlot::tuple.
|
static |
Definition at line 438 of file execTuples.c.
References ExecCopySlotHeapTuple(), ExecStoreHeapTuple(), MemoryContextSwitchTo(), and TupleTableSlot::tts_mcxt.
|
static |
Definition at line 451 of file execTuples.c.
References Assert, TTS_EMPTY, tts_heap_materialize(), and HeapTupleTableSlot::tuple.
|
static |
Definition at line 345 of file execTuples.c.
References Assert, HeapTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 355 of file execTuples.c.
References Assert, attnum, ereport, errcode(), errmsg(), ERROR, heap_getsysattr(), TTS_EMPTY, TupleTableSlot::tts_tupleDescriptor, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 316 of file execTuples.c.
|
static |
Definition at line 375 of file execTuples.c.
References Assert, ereport, errcode(), errmsg(), ERROR, HeapTupleHeaderGetRawXmin, HeapTupleData::t_data, TransactionIdIsCurrentTransactionId(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 398 of file execTuples.c.
References Assert, heap_copytuple(), heap_form_tuple(), MemoryContextSwitchTo(), HeapTupleTableSlot::off, TTS_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, and HeapTupleTableSlot::tuple.
Referenced by tts_heap_copy_heap_tuple(), tts_heap_copy_minimal_tuple(), and tts_heap_get_heap_tuple().
|
static |
Definition at line 321 of file execTuples.c.
|
static |
Definition at line 486 of file execTuples.c.
References HeapTupleTableSlot::off, HeapTupleData::t_self, TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, tts_heap_clear(), TupleTableSlot::tts_nvalid, TupleTableSlot::tts_tid, and HeapTupleTableSlot::tuple.
Referenced by ExecStoreHeapTuple().
|
static |
Definition at line 525 of file execTuples.c.
References heap_free_minimal_tuple(), ItemPointerSetInvalid(), MinimalTupleTableSlot::mintuple, MinimalTupleTableSlot::off, TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, and TupleTableSlot::tts_tid.
Referenced by tts_minimal_store_tuple().
|
static |
Definition at line 658 of file execTuples.c.
References heap_tuple_from_minimal_tuple(), MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
|
static |
Definition at line 669 of file execTuples.c.
References heap_copy_minimal_tuple(), MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
|
static |
Definition at line 634 of file execTuples.c.
References ExecCopySlotMinimalTuple(), ExecStoreMinimalTuple(), MemoryContextSwitchTo(), and TupleTableSlot::tts_mcxt.
|
static |
Definition at line 647 of file execTuples.c.
References MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
|
static |
Definition at line 543 of file execTuples.c.
References Assert, MinimalTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and MinimalTupleTableSlot::tuple.
|
static |
|
static |
Definition at line 508 of file execTuples.c.
References MinimalTupleTableSlot::minhdr, and MinimalTupleTableSlot::tuple.
|
static |
|
static |
Definition at line 586 of file execTuples.c.
References Assert, heap_copy_minimal_tuple(), heap_form_minimal_tuple(), MemoryContextSwitchTo(), MinimalTupleTableSlot::minhdr, MINIMAL_TUPLE_OFFSET, MinimalTupleTableSlot::mintuple, MinimalTupleTableSlot::off, HeapTupleData::t_data, HeapTupleData::t_len, MinimalTupleData::t_len, TTS_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, and MinimalTupleTableSlot::tuple.
Referenced by tts_minimal_copy_heap_tuple(), tts_minimal_copy_minimal_tuple(), and tts_minimal_get_minimal_tuple().
|
static |
Definition at line 520 of file execTuples.c.
|
static |
Definition at line 680 of file execTuples.c.
References Assert, MinimalTupleTableSlot::minhdr, MINIMAL_TUPLE_OFFSET, MinimalTupleTableSlot::mintuple, MinimalTupleTableSlot::off, HeapTupleData::t_data, HeapTupleData::t_len, MinimalTupleData::t_len, TTS_EMPTY, TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, tts_minimal_clear(), TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, and MinimalTupleTableSlot::tuple.
Referenced by ExecForceStoreMinimalTuple(), and ExecStoreMinimalTuple().
|
static |
Definition at line 108 of file execTuples.c.
References VirtualTupleTableSlot::data, ItemPointerSetInvalid(), pfree(), TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tid, and unlikely.
Referenced by tts_virtual_copyslot().
|
static |
Definition at line 291 of file execTuples.c.
References Assert, heap_form_tuple(), TTS_EMPTY, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
|
static |
Definition at line 301 of file execTuples.c.
References Assert, heap_form_minimal_tuple(), TTS_EMPTY, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
|
static |
Definition at line 269 of file execTuples.c.
References TupleDescData::natts, slot_getallattrs(), TTS_FLAG_EMPTY, TupleTableSlot::tts_flags, TupleTableSlot::tts_isnull, TupleTableSlot::tts_nvalid, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, tts_virtual_clear(), and tts_virtual_materialize().
|
static |
|
static |
|
static |
Definition at line 98 of file execTuples.c.
|
static |
|
static |
Definition at line 176 of file execTuples.c.
References att_addlength_datum, att_align_nominal, VirtualTupleTableSlot::data, data, DatumGetEOHP(), DatumGetPointer(), EOH_flatten_into(), EOH_get_flat_size(), MemoryContextAlloc(), TupleDescData::natts, PointerGetDatum(), TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_isnull, TupleTableSlot::tts_mcxt, TTS_SHOULDFREE, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, TupleDescAttr, val, and VARATT_IS_EXTERNAL_EXPANDED.
Referenced by tts_virtual_copyslot().
|
static |
Definition at line 103 of file execTuples.c.
AttInMetadata* TupleDescGetAttInMetadata | ( | TupleDesc | tupdesc | ) |
Definition at line 2173 of file execTuples.c.
References AttInMetadata::attinfuncs, AttInMetadata::attioparams, AttInMetadata::atttypmods, BlessTupleDesc(), fmgr_info(), getTypeInputInfo(), i, TupleDescData::natts, palloc(), palloc0(), AttInMetadata::tupdesc, and TupleDescAttr.
Referenced by bt_metap(), bt_multi_page_stats(), bt_page_stats_internal(), build_pgstattuple_type(), connectby_text(), connectby_text_serial(), create_foreign_modify(), crosstab(), dblink_get_pkey(), get_crosstab_tuplestore(), hash_page_items(), libpqrcv_processTuples(), materializeResult(), pg_get_keywords(), pg_get_multixact_members(), pg_stats_ext_mcvlist_items(), pgp_armor_headers(), pgrowlocks(), pgstatindex_impl(), pltcl_build_tuple_result(), pltcl_func_handler(), pltcl_init_tuple_store(), postgresAcquireSampleRowsFunc(), postgresBeginDirectModify(), postgresBeginForeignScan(), prs_setup_firstcall(), show_all_settings(), storeRow(), ts_setup_firstcall(), tt_setup_firstcall(), and xpath_table().
const TupleTableSlotOps TTSOpsBufferHeapTuple |
Definition at line 87 of file execTuples.c.
Referenced by CheckOpSlotCompatibility(), heapam_slot_callbacks(), and slot_compile_deform().
const TupleTableSlotOps TTSOpsHeapTuple |
Definition at line 85 of file execTuples.c.
Referenced by CatalogIndexInsert(), CheckOpSlotCompatibility(), compute_expr_stats(), compute_index_stats(), copyTemplateDependencies(), DefineTSConfiguration(), EnumValuesCreate(), ExecInitForeignScan(), ExecInitSetOp(), ExecuteCallStmt(), heapam_index_validate_scan(), init_tuple_slot(), InsertPgAttributeTuples(), make_build_data(), MakeConfigurationMapping(), recordMultipleDependencies(), slot_compile_deform(), table_slot_callbacks(), and tuplesort_begin_cluster().
const TupleTableSlotOps TTSOpsMinimalTuple |
Definition at line 86 of file execTuples.c.
Referenced by afterTriggerInvokeEvents(), build_pertrans_for_aggref(), BuildTupleHashTableExt(), check_publications(), check_publications_origin(), ExecInitAgg(), ExecInitCteScan(), ExecInitFunctionScan(), ExecInitGather(), ExecInitHash(), ExecInitIncrementalSort(), ExecInitMaterial(), ExecInitMemoize(), ExecInitNamedTuplestoreScan(), ExecInitSetOp(), ExecInitSort(), ExecInitSubPlan(), ExecInitTableFuncScan(), ExecInitUnique(), ExecInitWindowAgg(), ExecInitWorkTableScan(), ExecPrepareTuplestoreResult(), fetch_remote_table_info(), fetch_table_list(), find_hash_columns(), gather_merge_setup(), hashagg_recompile_expressions(), hypothetical_dense_rank_final(), init_sql_fcache(), ordered_set_startup(), RunFromStore(), slot_compile_deform(), synchronize_slots(), and validate_remote_info().
const TupleTableSlotOps TTSOpsVirtual |
Definition at line 84 of file execTuples.c.
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update(), CheckOpSlotCompatibility(), CreateReplicationSlot(), ExecComputeSlotInfo(), ExecConditionalAssignProjectionInfo(), ExecConstraints(), ExecGetResultSlotOps(), ExecInitAgg(), ExecInitAppend(), ExecInitCustomScan(), ExecInitGroup(), ExecInitHashJoin(), ExecInitIndexOnlyScan(), ExecInitJunkFilter(), ExecInitJunkFilterConversion(), ExecInitMemoize(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitPartitionDispatchInfo(), ExecInitProjectSet(), ExecInitResult(), ExecInitSort(), ExecInitSubPlan(), ExecInitValuesScan(), ExecInitWholeRowVar(), ExecInitWindowAgg(), ExecPartitionCheckEmitError(), ExecWithCheckOptions(), ExplainQuery(), GetAfterTriggersStoreSlot(), IdentifySystem(), InitPlan(), pgoutput_change(), pgoutput_row_filter(), ReadReplicationSlot(), RI_Initial_Check(), RI_PartitionRemove_Check(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), ShowGUCConfigOption(), slot_compile_deform(), StartReplication(), table_slot_callbacks(), and tstoreStartupReceiver().