PostgreSQL Source Code
git master
|
#include "executor/tuptable.h"
Go to the source code of this file.
Typedefs | |
typedef struct Tuplestorestate | Tuplestorestate |
typedef struct Tuplestorestate Tuplestorestate |
Definition at line 1 of file tuplestore.h.
bool tuplestore_advance | ( | Tuplestorestate * | state, |
bool | forward | ||
) |
Definition at line 1162 of file tuplestore.c.
References pfree(), and tuplestore_gettuple().
Referenced by CteScanNext(), ExecMaterial(), and window_gettupleslot().
int tuplestore_alloc_read_pointer | ( | Tuplestorestate * | state, |
int | eflags | ||
) |
Definition at line 395 of file tuplestore.c.
References elog, ERROR, repalloc(), and TSS_INMEM.
Referenced by ExecInitCteScan(), ExecInitNamedTuplestoreScan(), ExecMaterial(), and prepare_tuplestore().
bool tuplestore_ateof | ( | Tuplestorestate * | state | ) |
Definition at line 591 of file tuplestore.c.
Referenced by CteScanNext(), and ExecMaterial().
Tuplestorestate* tuplestore_begin_heap | ( | bool | randomAccess, |
bool | interXact, | ||
int | maxKBytes | ||
) |
Definition at line 330 of file tuplestore.c.
References copytup_heap(), EXEC_FLAG_BACKWARD, EXEC_FLAG_REWIND, readtup_heap(), tuplestore_begin_common(), and writetup_heap().
Referenced by connectby(), crosstab(), exec_init_tuple_store(), ExecInitCteScan(), ExecInitRecursiveUnion(), ExecMakeTableFunctionResult(), ExecMaterial(), ExecRecursiveUnion(), fmgr_sql(), get_crosstab_tuplestore(), GetCurrentFDWTuplestore(), InitMaterializedSRF(), libpqrcv_processTuples(), MakeTransitionCaptureState(), materializeResult(), plperl_return_next_internal(), pltcl_init_tuple_store(), populate_recordset_worker(), PortalCreateHoldStore(), prepare_tuplestore(), storeRow(), and tfuncFetchRows().
void tuplestore_clear | ( | Tuplestorestate * | state | ) |
Definition at line 430 of file tuplestore.c.
References Assert, BufFileClose(), TSReadPointer::current, TSReadPointer::eof_reached, GetMemoryChunkSpace(), i, MemoryContextReset(), TSS_INMEM, tuplestore_updatemax(), and USEMEM.
Referenced by ExecReScanCteScan(), ExecReScanRecursiveUnion(), fmgr_sql(), and release_partition().
void tuplestore_copy_read_pointer | ( | Tuplestorestate * | state, |
int | srcptr, | ||
int | destptr | ||
) |
Definition at line 1320 of file tuplestore.c.
References Assert, BufFileSeek(), BufFileTell(), TSReadPointer::eflags, elog, TSReadPointer::eof_reached, ereport, errcode_for_file_access(), errmsg(), ERROR, TSReadPointer::file, i, TSReadPointer::offset, TSS_INMEM, TSS_READFILE, and TSS_WRITEFILE.
Referenced by ExecMaterialMarkPos(), and ExecMaterialRestrPos().
void tuplestore_end | ( | Tuplestorestate * | state | ) |
Definition at line 492 of file tuplestore.c.
References BufFileClose(), MemoryContextDelete(), and pfree().
Referenced by AfterTriggerFreeQuery(), ExecEndCteScan(), ExecEndFunctionScan(), ExecEndMaterial(), ExecEndRecursiveUnion(), ExecEndTableFuncScan(), ExecEndWindowAgg(), ExecMakeFunctionResultSet(), ExecRecursiveUnion(), ExecReScanFunctionScan(), ExecReScanMaterial(), ExecReScanTableFuncScan(), PortalDrop(), ShutdownSetExpr(), ShutdownSQLFunction(), storeRow(), and walrcv_clear_result().
void tuplestore_get_stats | ( | Tuplestorestate * | state, |
char ** | storage_type, | ||
int64 * | max_space | ||
) |
Definition at line 1533 of file tuplestore.c.
References tuplestore_updatemax().
Referenced by show_material_info().
bool tuplestore_gettupleslot | ( | Tuplestorestate * | state, |
bool | forward, | ||
bool | copy, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 1130 of file tuplestore.c.
References ExecClearTuple(), ExecStoreMinimalTuple(), heap_copy_minimal_tuple(), and tuplestore_gettuple().
Referenced by AfterTriggerExecute(), check_publications(), check_publications_origin(), CteScanNext(), ExecMakeFunctionResultSet(), ExecMaterial(), ExecWindowAgg(), fetch_remote_table_info(), fetch_table_list(), fmgr_sql(), FunctionNext(), NamedTuplestoreScanNext(), RunFromStore(), synchronize_slots(), TableFuncNext(), update_frameheadpos(), update_frametailpos(), update_grouptailpos(), validate_remote_info(), window_gettupleslot(), and WorkTableScanNext().
bool tuplestore_in_memory | ( | Tuplestorestate * | state | ) |
void tuplestore_puttuple | ( | Tuplestorestate * | state, |
HeapTuple | tuple | ||
) |
Definition at line 764 of file tuplestore.c.
References COPYTUP, MemoryContextSwitchTo(), and tuplestore_puttuple_common().
Referenced by build_tuplestore_recursively(), crosstab(), each_object_field_end(), elements_array_element_end(), exec_stmt_return_next(), ExecMakeTableFunctionResult(), fill_hba_line(), fill_ident_line(), get_crosstab_tuplestore(), libpqrcv_processTuples(), materializeResult(), pg_available_wal_summaries(), pg_wal_summary_contents(), pgrowlocks(), plperl_return_next_internal(), pltcl_returnnext(), populate_recordset_record(), report_corruption_internal(), storeRow(), and xpath_table().
void tuplestore_puttupleslot | ( | Tuplestorestate * | state, |
TupleTableSlot * | slot | ||
) |
Definition at line 742 of file tuplestore.c.
References ExecCopySlotMinimalTuple(), GetMemoryChunkSpace(), MemoryContextSwitchTo(), tuplestore_puttuple_common(), and USEMEM.
Referenced by AfterTriggerSaveEvent(), begin_partition(), CteScanNext(), ExecMaterial(), ExecRecursiveUnion(), spool_tuples(), sqlfunction_receive(), TransitionTableAddTuple(), tstoreReceiveSlot_notoast(), and tstoreReceiveSlot_tupmap().
void tuplestore_putvalues | ( | Tuplestorestate * | state, |
TupleDesc | tdesc, | ||
const Datum * | values, | ||
const bool * | isnull | ||
) |
Definition at line 784 of file tuplestore.c.
References GetMemoryChunkSpace(), heap_form_minimal_tuple(), MemoryContextSwitchTo(), tuplestore_puttuple_common(), USEMEM, and values.
Referenced by brin_page_items(), dblink_get_notify(), each_worker_jsonb(), elements_worker_jsonb(), exec_stmt_return_next(), ExecMakeTableFunctionResult(), get_altertable_subcmdinfo(), get_available_versions_for_extension(), GetWALBlockInfo(), GetWALRecordsInfo(), GetXLogSummaryStats(), gist_page_items(), gist_page_items_bytea(), LogicalOutputWrite(), pg_available_extensions(), pg_config(), pg_cursor(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_extension_update_paths(), pg_get_replication_slots(), pg_get_shmem_allocations(), pg_get_wait_events(), pg_ls_dir(), pg_ls_dir_files(), pg_prepared_statement(), pg_show_replication_origin_status(), pg_stat_get_activity(), pg_stat_get_io(), pg_stat_get_progress_info(), pg_stat_get_recovery_prefetch(), pg_stat_get_slru(), pg_stat_get_subscription(), pg_stat_get_wal_senders(), pg_stat_statements_internal(), pg_tablespace_databases(), plperl_return_next_internal(), pltcl_returnnext(), postgres_fdw_get_connections_internal(), PutMemoryContextsStatsTupleStore(), show_all_file_settings(), split_text_accum_result(), tfuncLoadRows(), and tstoreReceiveSlot_detoast().
void tuplestore_rescan | ( | Tuplestorestate * | state | ) |
Definition at line 1285 of file tuplestore.c.
References Assert, BufFileSeek(), TSReadPointer::current, TSReadPointer::eflags, elog, TSReadPointer::eof_reached, ereport, errcode_for_file_access(), errmsg(), ERROR, EXEC_FLAG_REWIND, TSReadPointer::file, TSReadPointer::offset, TSS_INMEM, TSS_READFILE, and TSS_WRITEFILE.
Referenced by DoPortalRewind(), ExecInitCteScan(), ExecInitNamedTuplestoreScan(), ExecReScanCteScan(), ExecReScanFunctionScan(), ExecReScanMaterial(), ExecReScanNamedTuplestoreScan(), ExecReScanTableFuncScan(), ExecReScanWorkTableScan(), FunctionNext(), and PersistHoldablePortal().
void tuplestore_select_read_pointer | ( | Tuplestorestate * | state, |
int | ptr | ||
) |
Definition at line 507 of file tuplestore.c.
References Assert, BufFileSeek(), BufFileTell(), elog, TSReadPointer::eof_reached, ereport, errcode_for_file_access(), errmsg(), ERROR, TSReadPointer::file, TSReadPointer::offset, TSS_INMEM, TSS_READFILE, and TSS_WRITEFILE.
Referenced by CteScanNext(), ExecInitCteScan(), ExecInitNamedTuplestoreScan(), ExecReScanCteScan(), ExecReScanNamedTuplestoreScan(), ExecWindowAgg(), NamedTuplestoreScanNext(), update_frameheadpos(), update_frametailpos(), update_grouptailpos(), window_gettupleslot(), and WinSetMarkPosition().
void tuplestore_set_eflags | ( | Tuplestorestate * | state, |
int | eflags | ||
) |
Definition at line 371 of file tuplestore.c.
References elog, ERROR, i, and TSS_INMEM.
Referenced by ExecInitCteScan(), ExecMaterial(), and prepare_tuplestore().
bool tuplestore_skiptuples | ( | Tuplestorestate * | state, |
int64 | ntuples, | ||
bool | forward | ||
) |
Definition at line 1187 of file tuplestore.c.
References Assert, CHECK_FOR_INTERRUPTS, TSReadPointer::current, TSReadPointer::eflags, TSReadPointer::eof_reached, EXEC_FLAG_BACKWARD, pfree(), TSS_INMEM, and tuplestore_gettuple().
Referenced by PersistHoldablePortal(), window_gettupleslot(), and WinSetMarkPosition().
void tuplestore_trim | ( | Tuplestorestate * | state | ) |
Definition at line 1412 of file tuplestore.c.
References Assert, EXEC_FLAG_REWIND, FREEMEM, GetMemoryChunkSpace(), i, Min, pfree(), TSS_INMEM, and tuplestore_updatemax().
Referenced by ExecMaterialMarkPos(), and ExecWindowAgg().
int64 tuplestore_tuple_count | ( | Tuplestorestate * | state | ) |
Definition at line 580 of file tuplestore.c.
Referenced by exec_stmt_return_query(), fetch_remote_table_info(), and SPI_register_trigger_data().