PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/heaptoast.h"
#include "access/htup_details.h"
#include "access/tupdesc_details.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 2236 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(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
Definition at line 2052 of file execTuples.c.
References assign_record_type_typmod(), TupleDescData::tdtypeid, and TupleDescData::tdtypmod.
Referenced by aclexplode(), brin_metapage_info(), bt_page_items(), bt_page_items_bytea(), each_worker(), each_worker_jsonb(), elements_worker(), elements_worker_jsonb(), 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(), MakeOldSnapshotTimeMappingTupleDesc(), pg_buffercache_pages(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_get_object_address(), pg_identify_object(), pg_identify_object_as_address(), pg_last_committed_xact(), pg_lock_status(), pg_partition_tree(), pg_prepared_xact(), pg_sequence_parameters(), pg_stat_file(), pg_stat_get_archiver(), pg_stat_get_wal(), pg_stats_ext_mcvlist_items(), pg_timezone_abbrevs(), pg_visibility_map_summary(), pg_visibility_tupdesc(), pg_walfile_name_offset(), pg_xact_commit_timestamp_origin(), pgstathashindex(), PLy_output_setup_record(), setup_firstcall(), ssl_extension_info(), test_predtest(), ts_setup_firstcall(), tsvector_unnest(), TupleDescGetAttInMetadata(), and verify_heapam_tupdesc().
HeapTuple BuildTupleFromCStrings | ( | AttInMetadata * | attinmeta, |
char ** | values | ||
) |
Definition at line 2116 of file execTuples.c.
References AttInMetadata::attinfuncs, AttInMetadata::attioparams, AttInMetadata::atttypmods, heap_form_tuple(), i, InputFunctionCall(), TupleDescData::natts, palloc(), pfree(), AttInMetadata::tupdesc, and TupleDescAttr.
Referenced by bt_metap(), bt_page_stats(), build_pgstattuple_type(), build_tuplestore_recursively(), crosstab(), dblink_get_pkey(), get_crosstab_tuplestore(), libpqrcv_processTuples(), materializeResult(), pg_config(), pg_get_keywords(), pg_get_multixact_members(), pg_logdir_ls_internal(), 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 2284 of file execTuples.c.
References cstring_to_text_with_len(), DatumGetPointer, do_tup_output(), pfree(), PointerGetDatum, and values.
Referenced by ExplainQuery().
void do_tup_output | ( | TupOutputState * | tstate, |
Datum * | values, | ||
bool * | isnull | ||
) |
Definition at line 2256 of file execTuples.c.
References TupOutputState::dest, ExecClearTuple(), ExecStoreVirtualTuple(), TupleDescData::natts, _DestReceiver::receiveSlot, TupOutputState::slot, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by CreateReplicationSlot(), do_text_output_multiline(), IdentifySystem(), ShowAllGUCConfig(), and StartReplication().
void end_tup_output | ( | TupOutputState * | tstate | ) |
Definition at line 2314 of file execTuples.c.
References TupOutputState::dest, ExecDropSingleTupleTableSlot(), pfree(), _DestReceiver::rShutdown, and TupOutputState::slot.
Referenced by CreateReplicationSlot(), ExecuteCallStmt(), ExplainQuery(), IdentifySystem(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
TupleTableSlot* ExecAllocTableSlot | ( | List ** | tupleTable, |
TupleDesc | desc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1141 of file execTuples.c.
References lappend(), and MakeTupleTableSlot().
Referenced by AfterTriggerSaveEvent(), ExecInitExtraTupleSlot(), ExecInitIndexOnlyScan(), ExecInitResultSlot(), ExecInitScanTupleSlot(), and find_hash_columns().
Definition at line 1920 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by ExecInitJunkFilter(), PlanCacheComputeResultDesc(), and PortalStart().
void ExecDropSingleTupleTableSlot | ( | TupleTableSlot * | slot | ) |
Definition at line 1224 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(), afterTriggerInvokeEvents(), AlterDomainNotNull(), ATRewriteTable(), CatalogIndexInsert(), check_default_partition_contents(), check_exclusion_or_unique_constraint(), compute_index_stats(), CopyMultiInsertBufferCleanup(), copyTemplateDependencies(), CopyTo(), DefineQueryRewrite(), end_tup_output(), ExecCleanupTupleRouting(), ExecEndIncrementalSort(), ExecEndModifyTable(), fetch_remote_table_info(), fetch_table_list(), get_actual_variable_range(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), hypothetical_dense_rank_final(), IndexCheckExclusion(), InsertPgAttributeTuples(), recordMultipleDependencies(), RelationFindReplTupleSeq(), RI_Initial_Check(), RunFromStore(), systable_endscan(), systable_endscan_ordered(), table_index_fetch_tuple_check(), tstoreShutdownReceiver(), tuplesort_free(), unique_key_recheck(), validateDomainConstraint(), and validateForeignKeyConstraint().
HeapTuple ExecFetchSlotHeapTuple | ( | TupleTableSlot * | slot, |
bool | materialize, | ||
bool * | shouldFree | ||
) |
Definition at line 1614 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 1693 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 1662 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 1439 of file execTuples.c.
References BufferHeapTupleTableSlot::base, 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, TupleTableSlot::tts_values, and HeapTupleTableSlot::tuple.
Referenced by agg_retrieve_direct(), ExecARDeleteTriggers(), ExecARUpdateTriggers(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecDelete(), ExecIRDeleteTriggers(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), IndexNextWithReorder(), IndexOnlyNext(), and store_returning_result().
void ExecForceStoreMinimalTuple | ( | MinimalTuple | mtup, |
TupleTableSlot * | slot, | ||
bool | shouldFree | ||
) |
Definition at line 1482 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 1801 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(), ExecInitModifyTable(), ExecInitNullTupleSlot(), ExecInitPartitionInfo(), ExecInitSubPlan(), ExecInitWholeRowVar(), ExecInitWindowAgg(), gather_merge_setup(), and InitPlan().
TupleTableSlot* ExecInitNullTupleSlot | ( | EState * | estate, |
TupleDesc | tupType, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1817 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 1749 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 1769 of file execTuples.c.
References ExecInitResultSlot(), and ExecInitResultTypeTL().
Referenced by ExecInitAgg(), ExecInitAppend(), ExecInitCustomScan(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitMaterial(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitProjectSet(), ExecInitResult(), ExecInitSetOp(), ExecInitSort(), ExecInitUnique(), and ExecInitWindowAgg().
void ExecInitResultTypeTL | ( | PlanState * | planstate | ) |
Definition at line 1725 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(), ExecInitTidScan(), ExecInitValuesScan(), and ExecInitWorkTableScan().
void ExecInitScanTupleSlot | ( | EState * | estate, |
ScanState * | scanstate, | ||
TupleDesc | tupledesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1781 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(), ExecInitTidScan(), ExecInitValuesScan(), and ExecInitWorkTableScan().
Definition at line 1161 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(), apply_handle_delete(), apply_handle_insert(), apply_handle_update(), CopyFrom(), EvalPlanQualEnd(), and ExecEndPlan().
void ExecSetSlotDescriptor | ( | TupleTableSlot * | slot, |
TupleDesc | tupdesc | ||
) |
Definition at line 1259 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(), ExecInitJunkFilterConversion(), and ExecInitJunkFilterInsertion().
TupleTableSlot* ExecStoreAllNullTuple | ( | TupleTableSlot * | slot | ) |
Definition at line 1546 of file execTuples.c.
References Assert, ExecClearTuple(), ExecStoreVirtualTuple(), MemSet, TupleDescData::natts, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by ATRewriteTable(), BitmapHeapNext(), ExecDelete(), ExecInitNullTupleSlot(), get_returning_data(), and prepare_projection_slot().
TupleTableSlot* ExecStoreBufferHeapTuple | ( | HeapTuple | tuple, |
TupleTableSlot * | slot, | ||
Buffer | buffer | ||
) |
Definition at line 1362 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(), 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 1322 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(), compute_index_stats(), ExecForceStoreHeapTuple(), ExecuteCallStmt(), get_returning_data(), heapam_index_validate_scan(), postgresIterateForeignScan(), setop_retrieve_direct(), and tts_heap_copyslot().
void ExecStoreHeapTupleDatum | ( | Datum | data, |
TupleTableSlot * | slot | ||
) |
Definition at line 1576 of file execTuples.c.
References 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 1416 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(), ExecParallelScanHashBucket(), ExecScanHashBucket(), ExecScanHashTableForUnmatched(), findPartialMatch(), gather_getnext(), gather_merge_readnext(), 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 1388 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 1522 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(), do_tup_output(), ExecComputeStoredGenerated(), ExecEvalAggOrderedTransTuple(), ExecFilterJunk(), ExecForceStoreHeapTuple(), ExecForceStoreMinimalTuple(), ExecProjectSRF(), ExecStoreAllNullTuple(), ExecStoreHeapTupleDatum(), execute_attr_map_slot(), fileIterateForeignScan(), FunctionNext(), hashagg_spill_tuple(), hypothetical_dense_rank_final(), hypothetical_rank_common(), InsertPgAttributeTuples(), ordered_set_transition_multi(), prepare_hash_slot(), recordMultipleDependencies(), RI_Initial_Check(), RI_PartitionRemove_Check(), slot_modify_data(), slot_store_data(), StoreIndexTuple(), and ValuesNext().
Definition at line 1967 of file execTuples.c.
References CreateTemplateTupleDesc(), exprCollation(), exprType(), exprTypmod(), lfirst, list_length(), TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecInitExprRec(), and ExecInitValuesScan().
Definition at line 1908 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by build_pertrans_for_aggref(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitIndexOnlyScan(), ExecInitModifyTable(), ExecInitPartitionInfo(), ExecInitResultTypeTL(), ExecInitSubPlan(), find_hash_columns(), and ordered_set_startup().
Definition at line 1926 of file execTuples.c.
References CreateTemplateTupleDesc(), ExecCleanTargetListLength(), ExecTargetListLength(), TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), lfirst, TargetEntry::resjunk, TargetEntry::resname, TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecCleanTypeFromTL(), and ExecTypeFromTL().
Definition at line 2006 of file execTuples.c.
References lfirst, NameStr, namestrcpy(), TupleDescData::natts, strVal, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and TupleDescAttr.
Referenced by ExecEvalWholeRowVar(), and ExecInitExprRec().
Datum HeapTupleHeaderGetDatum | ( | HeapTupleHeader | tuple | ) |
Definition at line 2205 of file execTuples.c.
References HeapTupleHeaderGetDatumLength, HeapTupleHeaderGetTypeId, HeapTupleHeaderGetTypMod, HeapTupleHeaderHasExternal, lookup_rowtype_tupdesc(), PointerGetDatum, ReleaseTupleDesc, and toast_flatten_tuple_to_datum().
Referenced by populate_composite(), and populate_recordset_record().
TupleTableSlot* MakeSingleTupleTableSlot | ( | TupleDesc | tupdesc, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1208 of file execTuples.c.
References MakeTupleTableSlot().
Referenced by afterTriggerInvokeEvents(), ATRewriteTable(), begin_tup_output_tupdesc(), BuildTupleHashTableExt(), CatalogIndexInsert(), compute_index_stats(), copyTemplateDependencies(), ExecInitIncrementalSort(), ExecInitJunkFilterConversion(), ExecInitJunkFilterInsertion(), ExecInitPartitionDispatchInfo(), ExecPrepareTuplestoreResult(), fetch_remote_table_info(), fetch_table_list(), heapam_index_validate_scan(), hypothetical_dense_rank_final(), init_sql_fcache(), InsertPgAttributeTuples(), ordered_set_startup(), recordMultipleDependencies(), RI_Initial_Check(), RI_PartitionRemove_Check(), RunFromStore(), table_slot_create(), tstoreStartupReceiver(), and tuplesort_begin_cluster().
TupleTableSlot* MakeTupleTableSlot | ( | TupleDesc | tupleDesc, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1082 of file execTuples.c.
References TupleTableSlotOps::base_slot_size, CurrentMemoryContext, TupleTableSlotOps::init, MAXALIGN, TupleDescData::natts, palloc0(), PinTupleDesc, T_TupleTableSlot, 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(), and MakeSingleTupleTableSlot().
|
static |
Definition at line 895 of file execTuples.c.
References att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull, attnum, TupleTableSlotOps::base_slot_size, fetchatt, HeapTupleHasNulls, HeapTupleHeaderGetNatts, init, Min, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, tts_buffer_heap_clear(), tts_buffer_heap_copy_heap_tuple(), tts_buffer_heap_copy_minimal_tuple(), tts_buffer_heap_copyslot(), tts_buffer_heap_get_heap_tuple(), tts_buffer_heap_getsomeattrs(), tts_buffer_heap_getsysattr(), tts_buffer_heap_init(), tts_buffer_heap_materialize(), tts_buffer_heap_release(), TTS_FLAG_SLOW, tts_heap_clear(), tts_heap_copy_heap_tuple(), tts_heap_copy_minimal_tuple(), tts_heap_copyslot(), tts_heap_get_heap_tuple(), tts_heap_getsomeattrs(), tts_heap_getsysattr(), tts_heap_init(), tts_heap_materialize(), tts_heap_release(), TupleTableSlot::tts_isnull, tts_minimal_clear(), tts_minimal_copy_heap_tuple(), tts_minimal_copy_minimal_tuple(), tts_minimal_copyslot(), tts_minimal_get_minimal_tuple(), tts_minimal_getsomeattrs(), tts_minimal_getsysattr(), tts_minimal_init(), tts_minimal_materialize(), tts_minimal_release(), TupleTableSlot::tts_nvalid, TTS_SLOW, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, tts_virtual_clear(), tts_virtual_copy_heap_tuple(), tts_virtual_copy_minimal_tuple(), tts_virtual_copyslot(), tts_virtual_getsomeattrs(), tts_virtual_getsysattr(), tts_virtual_init(), tts_virtual_materialize(), tts_virtual_release(), 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 1838 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 1872 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 638 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, BufferHeapTupleTableSlot::buffer, BufferIsValid, heap_freetuple(), InvalidBuffer, ItemPointerSetInvalid, HeapTupleTableSlot::off, ReleaseBuffer(), TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tid, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 803 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, heap_copytuple(), tts_buffer_heap_materialize(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 816 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, minimal_tuple_from_heap_tuple(), tts_buffer_heap_materialize(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 748 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, 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, TTS_SHOULDFREE, HeapTupleTableSlot::tupdata, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 790 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, tts_buffer_heap_materialize(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 668 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, HeapTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 678 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, heap_getsysattr(), TTS_EMPTY, TupleTableSlot::tts_tupleDescriptor, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
|
static |
Definition at line 689 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, BufferHeapTupleTableSlot::buffer, BufferIsValid, heap_copytuple(), heap_form_tuple(), InvalidBuffer, likely, MemoryContextSwitchTo(), HeapTupleTableSlot::off, ReleaseBuffer(), 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 slot_deform_heap_tuple(), tts_buffer_heap_copy_heap_tuple(), tts_buffer_heap_copy_minimal_tuple(), and tts_buffer_heap_get_heap_tuple().
|
static |
|
inlinestatic |
Definition at line 829 of file execTuples.c.
References Assert, BufferHeapTupleTableSlot::base, BufferHeapTupleTableSlot::buffer, BufferIsValid, heap_freetuple(), IncrBufferRefCount(), HeapTupleTableSlot::off, pg_attribute_always_inline, ReleaseBuffer(), HeapTupleData::t_self, TTS_FLAG_EMPTY, TTS_FLAG_SHOULDFREE, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, TTS_SHOULDFREE, TupleTableSlot::tts_tid, and HeapTupleTableSlot::tuple.
Referenced by ExecStoreBufferHeapTuple(), ExecStorePinnedBufferHeapTuple(), and tts_buffer_heap_copyslot().
|
static |
Definition at line 303 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 slot_deform_heap_tuple(), and tts_heap_store_tuple().
|
static |
Definition at line 408 of file execTuples.c.
References Assert, heap_copytuple(), TTS_EMPTY, tts_heap_materialize(), and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 420 of file execTuples.c.
References minimal_tuple_from_heap_tuple(), tts_heap_materialize(), and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 383 of file execTuples.c.
References ExecCopySlotHeapTuple(), ExecStoreHeapTuple(), MemoryContextSwitchTo(), and TupleTableSlot::tts_mcxt.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 396 of file execTuples.c.
References Assert, TTS_EMPTY, tts_heap_materialize(), and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 322 of file execTuples.c.
References Assert, HeapTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 332 of file execTuples.c.
References Assert, heap_getsysattr(), TTS_EMPTY, TupleTableSlot::tts_tupleDescriptor, and HeapTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
|
static |
Definition at line 343 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 slot_deform_heap_tuple(), tts_heap_copy_heap_tuple(), tts_heap_copy_minimal_tuple(), and tts_heap_get_heap_tuple().
|
static |
|
static |
Definition at line 431 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 470 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 slot_deform_heap_tuple(), and tts_minimal_store_tuple().
|
static |
Definition at line 577 of file execTuples.c.
References heap_tuple_from_minimal_tuple(), MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 588 of file execTuples.c.
References heap_copy_minimal_tuple(), MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 553 of file execTuples.c.
References ExecCopySlotMinimalTuple(), ExecStoreMinimalTuple(), MemoryContextSwitchTo(), and TupleTableSlot::tts_mcxt.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 566 of file execTuples.c.
References MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 488 of file execTuples.c.
References Assert, MinimalTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and MinimalTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 498 of file execTuples.c.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 453 of file execTuples.c.
References MinimalTupleTableSlot::minhdr, and MinimalTupleTableSlot::tuple.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 506 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 slot_deform_heap_tuple(), tts_minimal_copy_heap_tuple(), tts_minimal_copy_minimal_tuple(), and tts_minimal_get_minimal_tuple().
|
static |
|
static |
Definition at line 599 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 107 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 slot_deform_heap_tuple(), and tts_virtual_copyslot().
|
static |
Definition at line 268 of file execTuples.c.
References Assert, heap_form_tuple(), TTS_EMPTY, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 278 of file execTuples.c.
References Assert, heap_form_minimal_tuple(), TTS_EMPTY, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, and TupleTableSlot::tts_values.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 244 of file execTuples.c.
References Assert, 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().
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 130 of file execTuples.c.
Referenced by slot_deform_heap_tuple().
|
static |
Definition at line 136 of file execTuples.c.
Referenced by slot_deform_heap_tuple().
|
static |
|
static |
Definition at line 151 of file execTuples.c.
References att_addlength_datum, att_align_nominal, VirtualTupleTableSlot::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 slot_deform_heap_tuple(), and tts_virtual_copyslot().
|
static |
AttInMetadata* TupleDescGetAttInMetadata | ( | TupleDesc | tupdesc | ) |
Definition at line 2067 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_page_stats(), 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_config(), pg_get_keywords(), pg_get_multixact_members(), pg_logdir_ls_internal(), 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 86 of file execTuples.c.
Referenced by CheckOpSlotCompatibility(), heapam_slot_callbacks(), and slot_compile_deform().
const TupleTableSlotOps TTSOpsHeapTuple |
Definition at line 84 of file execTuples.c.
Referenced by CatalogIndexInsert(), CheckOpSlotCompatibility(), compute_index_stats(), copyTemplateDependencies(), ExecInitForeignScan(), ExecInitSetOp(), ExecuteCallStmt(), heapam_index_validate_scan(), InsertPgAttributeTuples(), recordMultipleDependencies(), slot_compile_deform(), table_slot_callbacks(), and tuplesort_begin_cluster().
const TupleTableSlotOps TTSOpsMinimalTuple |
Definition at line 85 of file execTuples.c.
Referenced by afterTriggerInvokeEvents(), build_pertrans_for_aggref(), BuildTupleHashTableExt(), ExecInitAgg(), ExecInitCteScan(), ExecInitFunctionScan(), ExecInitGather(), ExecInitHash(), ExecInitIncrementalSort(), ExecInitMaterial(), 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(), and slot_compile_deform().
const TupleTableSlotOps TTSOpsVirtual |
Definition at line 83 of file execTuples.c.
Referenced by AfterTriggerSaveEvent(), apply_handle_delete(), apply_handle_insert(), apply_handle_update(), CheckOpSlotCompatibility(), CreateReplicationSlot(), ExecComputeSlotInfo(), ExecConditionalAssignProjectionInfo(), ExecConstraints(), ExecGetResultSlotOps(), ExecInitAgg(), ExecInitAppend(), ExecInitCustomScan(), ExecInitGroup(), ExecInitHashJoin(), ExecInitIndexOnlyScan(), ExecInitJunkFilterConversion(), ExecInitJunkFilterInsertion(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitPartitionDispatchInfo(), ExecInitPartitionInfo(), ExecInitProjectSet(), ExecInitResult(), ExecInitSort(), ExecInitSubPlan(), ExecInitValuesScan(), ExecInitWholeRowVar(), ExecInitWindowAgg(), ExecPartitionCheckEmitError(), ExecWithCheckOptions(), ExplainQuery(), IdentifySystem(), InitPlan(), llvm_compile_expr(), RI_Initial_Check(), RI_PartitionRemove_Check(), ShowAllGUCConfig(), ShowGUCConfigOption(), slot_compile_deform(), StartReplication(), table_slot_callbacks(), and tstoreStartupReceiver().