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 2255 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(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
Definition at line 2071 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(), MakeOldSnapshotTimeMappingTupleDesc(), pg_buffercache_pages(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_get_catalog_foreign_keys(), pg_get_object_address(), pg_get_publication_tables(), 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_replication_slot(), pg_stat_get_subscription_stats(), 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(), SetSingleFuncCall(), setup_firstcall(), ssl_extension_info(), test_enc_conversion(), test_predtest(), ts_setup_firstcall(), tsvector_unnest(), and TupleDescGetAttInMetadata().
HeapTuple BuildTupleFromCStrings | ( | AttInMetadata * | attinmeta, |
char ** | values | ||
) |
Definition at line 2135 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_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(), 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 2303 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, |
Datum * | values, | ||
bool * | isnull | ||
) |
Definition at line 2275 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(), ShowAllGUCConfig(), and StartReplication().
void end_tup_output | ( | TupOutputState * | tstate | ) |
Definition at line 2333 of file execTuples.c.
References TupOutputState::dest, ExecDropSingleTupleTableSlot(), pfree(), _DestReceiver::rShutdown, and TupOutputState::slot.
Referenced by CreateReplicationSlot(), ExecuteCallStmt(), ExplainQuery(), IdentifySystem(), ReadReplicationSlot(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
TupleTableSlot* ExecAllocTableSlot | ( | List ** | tupleTable, |
TupleDesc | desc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1171 of file execTuples.c.
References lappend(), and MakeTupleTableSlot().
Referenced by ExecInitExtraTupleSlot(), ExecInitIndexOnlyScan(), ExecInitResultSlot(), ExecInitScanTupleSlot(), and find_hash_columns().
Definition at line 1950 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by ExecInitJunkFilter(), PlanCacheComputeResultDesc(), and PortalStart().
void ExecDropSingleTupleTableSlot | ( | TupleTableSlot * | slot | ) |
Definition at line 1254 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(), AlterDomainNotNull(), ATRewriteTable(), CatalogIndexInsert(), check_default_partition_contents(), check_exclusion_or_unique_constraint(), check_publications(), compute_expr_stats(), compute_index_stats(), CopyMultiInsertBufferCleanup(), copyTemplateDependencies(), DefineQueryRewrite(), DoCopyTo(), end_tup_output(), ExecCleanupTupleRouting(), ExecEndIncrementalSort(), ExecEndModifyTable(), fetch_remote_table_info(), fetch_table_list(), get_actual_variable_range(), get_rel_sync_entry(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), hypothetical_dense_rank_final(), IndexCheckExclusion(), InsertPgAttributeTuples(), make_build_data(), recordMultipleDependencies(), RelationFindReplTupleSeq(), RI_Initial_Check(), RunFromStore(), systable_endscan(), systable_endscan_ordered(), table_index_fetch_tuple_check(), tstoreShutdownReceiver(), tuplesort_free(), validateDomainConstraint(), and validateForeignKeyConstraint().
HeapTuple ExecFetchSlotHeapTuple | ( | TupleTableSlot * | slot, |
bool | materialize, | ||
bool * | shouldFree | ||
) |
Definition at line 1644 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 1723 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 1692 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 1469 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(), ExecModifyTable(), IndexNextWithReorder(), IndexOnlyNext(), and store_returning_result().
void ExecForceStoreMinimalTuple | ( | MinimalTuple | mtup, |
TupleTableSlot * | slot, | ||
bool | shouldFree | ||
) |
Definition at line 1512 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 1831 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 1847 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 1779 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 1799 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 1755 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 1811 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().
Definition at line 1191 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 1289 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 1576 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 1392 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 1352 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_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 1606 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 1446 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(), 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 1418 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 1552 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(), ExecSort(), ExecStoreAllNullTuple(), ExecStoreHeapTupleDatum(), execute_attr_map_slot(), fileIterateForeignScan(), FunctionNext(), hashagg_spill_tuple(), hypothetical_dense_rank_final(), hypothetical_rank_common(), InsertPgAttributeTuples(), 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 1997 of file execTuples.c.
References CreateTemplateTupleDesc(), exprCollation(), exprType(), exprTypmod(), lfirst, list_length(), TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecInitExprRec(), ExecInitMemoize(), and ExecInitValuesScan().
Definition at line 1938 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 1956 of file execTuples.c.
References CreateTemplateTupleDesc(), ExecCleanTargetListLength(), ExecTargetListLength(), TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), len, lfirst, TargetEntry::resjunk, TargetEntry::resname, TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecCleanTypeFromTL(), and ExecTypeFromTL().
Definition at line 2030 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 2224 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 1238 of file execTuples.c.
References MakeTupleTableSlot().
Referenced by afterTriggerInvokeEvents(), ATRewriteTable(), begin_tup_output_tupdesc(), BuildTupleHashTableExt(), CatalogIndexInsert(), check_publications(), compute_expr_stats(), compute_index_stats(), copyTemplateDependencies(), 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(), ordered_set_startup(), pgoutput_row_filter(), 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 1112 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(), MakeSingleTupleTableSlot(), and pgoutput_change().
|
static |
Definition at line 925 of file execTuples.c.
References att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull, attnum, fetchatt, 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 1868 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 1902 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 659 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.
|
static |
Definition at line 833 of file execTuples.c.
References Assert(), BufferHeapTupleTableSlot::base, heap_copytuple(), tts_buffer_heap_materialize(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 846 of file execTuples.c.
References Assert(), BufferHeapTupleTableSlot::base, minimal_tuple_from_heap_tuple(), tts_buffer_heap_materialize(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 778 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.
|
static |
Definition at line 820 of file execTuples.c.
References Assert(), BufferHeapTupleTableSlot::base, tts_buffer_heap_materialize(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 689 of file execTuples.c.
References Assert(), BufferHeapTupleTableSlot::base, HeapTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 699 of file execTuples.c.
References Assert(), attnum, BufferHeapTupleTableSlot::base, ereport, errcode(), errmsg(), ERROR, heap_getsysattr(), TTS_EMPTY, TupleTableSlot::tts_tupleDescriptor, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 649 of file execTuples.c.
|
static |
Definition at line 719 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 tts_buffer_heap_copy_heap_tuple(), tts_buffer_heap_copy_minimal_tuple(), and tts_buffer_heap_get_heap_tuple().
|
static |
Definition at line 654 of file execTuples.c.
|
inlinestatic |
Definition at line 859 of file execTuples.c.
References Assert(), BufferHeapTupleTableSlot::base, BufferHeapTupleTableSlot::buffer, BufferIsValid, heap_freetuple(), IncrBufferRefCount(), HeapTupleTableSlot::off, 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 311 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 425 of file execTuples.c.
References Assert(), heap_copytuple(), TTS_EMPTY, tts_heap_materialize(), and HeapTupleTableSlot::tuple.
|
static |
Definition at line 437 of file execTuples.c.
References minimal_tuple_from_heap_tuple(), tts_heap_materialize(), and HeapTupleTableSlot::tuple.
|
static |
Definition at line 400 of file execTuples.c.
References ExecCopySlotHeapTuple(), ExecStoreHeapTuple(), MemoryContextSwitchTo(), and TupleTableSlot::tts_mcxt.
|
static |
Definition at line 413 of file execTuples.c.
References Assert(), TTS_EMPTY, tts_heap_materialize(), and HeapTupleTableSlot::tuple.
|
static |
Definition at line 330 of file execTuples.c.
References Assert(), HeapTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and HeapTupleTableSlot::tuple.
|
static |
Definition at line 340 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 301 of file execTuples.c.
|
static |
Definition at line 360 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 306 of file execTuples.c.
|
static |
Definition at line 448 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 487 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 598 of file execTuples.c.
References heap_tuple_from_minimal_tuple(), MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
|
static |
Definition at line 609 of file execTuples.c.
References heap_copy_minimal_tuple(), MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
|
static |
Definition at line 574 of file execTuples.c.
References ExecCopySlotMinimalTuple(), ExecStoreMinimalTuple(), MemoryContextSwitchTo(), and TupleTableSlot::tts_mcxt.
|
static |
Definition at line 587 of file execTuples.c.
References MinimalTupleTableSlot::mintuple, and tts_minimal_materialize().
|
static |
Definition at line 505 of file execTuples.c.
References Assert(), MinimalTupleTableSlot::off, slot_deform_heap_tuple(), TTS_EMPTY, and MinimalTupleTableSlot::tuple.
|
static |
|
static |
Definition at line 470 of file execTuples.c.
References MinimalTupleTableSlot::minhdr, and MinimalTupleTableSlot::tuple.
|
static |
Definition at line 527 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 482 of file execTuples.c.
|
static |
Definition at line 620 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 tts_virtual_copyslot().
|
static |
Definition at line 276 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 286 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 252 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().
|
static |
|
static |
|
static |
Definition at line 97 of file execTuples.c.
|
static |
Definition at line 159 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 102 of file execTuples.c.
AttInMetadata* TupleDescGetAttInMetadata | ( | TupleDesc | tupdesc | ) |
Definition at line 2086 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_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_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_expr_stats(), compute_index_stats(), copyTemplateDependencies(), ExecInitForeignScan(), ExecInitSetOp(), ExecuteCallStmt(), heapam_index_validate_scan(), init_tuple_slot(), InsertPgAttributeTuples(), make_build_data(), 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(), check_publications(), 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(), and slot_compile_deform().
const TupleTableSlotOps TTSOpsVirtual |
Definition at line 83 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(), ShowAllGUCConfig(), ShowGUCConfigOption(), slot_compile_deform(), StartReplication(), table_slot_callbacks(), and tstoreStartupReceiver().