PostgreSQL Source Code
git master
|
#include "executor/tuptable.h"
Go to the source code of this file.
Macros | |
#define | tuplestore_donestoring(state) ((void) 0) |
Typedefs | |
typedef struct Tuplestorestate | Tuplestorestate |
#define tuplestore_donestoring | ( | state | ) | ((void) 0) |
Definition at line 60 of file tuplestore.h.
typedef struct Tuplestorestate Tuplestorestate |
Definition at line 1 of file tuplestore.h.
bool tuplestore_advance | ( | Tuplestorestate * | state, |
bool | forward | ||
) |
Definition at line 1110 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 383 of file tuplestore.c.
References elog(), ERROR, repalloc(), and TSS_INMEM.
Referenced by begin_partition(), ExecInitCteScan(), ExecInitNamedTuplestoreScan(), and ExecMaterial().
bool tuplestore_ateof | ( | Tuplestorestate * | state | ) |
Definition at line 557 of file tuplestore.c.
Referenced by CteScanNext(), and ExecMaterial().
Tuplestorestate* tuplestore_begin_heap | ( | bool | randomAccess, |
bool | interXact, | ||
int | maxKBytes | ||
) |
Definition at line 318 of file tuplestore.c.
References copytup_heap(), EXEC_FLAG_BACKWARD, EXEC_FLAG_REWIND, readtup_heap(), tuplestore_begin_common(), and writetup_heap().
Referenced by begin_partition(), connectby(), crosstab(), exec_init_tuple_store(), ExecInitCteScan(), ExecInitRecursiveUnion(), ExecMakeTableFunctionResult(), ExecMaterial(), ExecRecursiveUnion(), fmgr_sql(), get_crosstab_tuplestore(), GetCurrentFDWTuplestore(), InitMaterializedSRF(), libpqrcv_processTuples(), MakeTransitionCaptureState(), materializeResult(), pg_logdir_ls_internal(), plperl_return_next_internal(), pltcl_init_tuple_store(), populate_recordset_worker(), PortalCreateHoldStore(), storeRow(), and tfuncFetchRows().
void tuplestore_clear | ( | Tuplestorestate * | state | ) |
Definition at line 418 of file tuplestore.c.
References BufFileClose(), TSReadPointer::current, TSReadPointer::eof_reached, FREEMEM, GetMemoryChunkSpace(), i, pfree(), and TSS_INMEM.
Referenced by ExecReScanCteScan(), ExecReScanRecursiveUnion(), and fmgr_sql().
void tuplestore_copy_read_pointer | ( | Tuplestorestate * | state, |
int | srcptr, | ||
int | destptr | ||
) |
Definition at line 1268 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 453 of file tuplestore.c.
References BufFileClose(), i, and pfree().
Referenced by AfterTriggerFreeQuery(), ExecEndCteScan(), ExecEndFunctionScan(), ExecEndMaterial(), ExecEndRecursiveUnion(), ExecEndTableFuncScan(), ExecMakeFunctionResultSet(), ExecRecursiveUnion(), ExecReScanFunctionScan(), ExecReScanMaterial(), ExecReScanTableFuncScan(), PortalDrop(), release_partition(), ShutdownSetExpr(), ShutdownSQLFunction(), storeRow(), and walrcv_clear_result().
bool tuplestore_gettupleslot | ( | Tuplestorestate * | state, |
bool | forward, | ||
bool | copy, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 1078 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(), TableFuncNext(), update_frameheadpos(), update_frametailpos(), update_grouptailpos(), window_gettupleslot(), and WorkTableScanNext().
bool tuplestore_in_memory | ( | Tuplestorestate * | state | ) |
void tuplestore_puttuple | ( | Tuplestorestate * | state, |
HeapTuple | tuple | ||
) |
Definition at line 730 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_logdir_ls_internal(), 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 708 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, | ||
Datum * | values, | ||
bool * | isnull | ||
) |
Definition at line 750 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(), PutMemoryContextsStatsTupleStore(), show_all_file_settings(), split_text_accum_result(), tfuncLoadRows(), and tstoreReceiveSlot_detoast().
void tuplestore_rescan | ( | Tuplestorestate * | state | ) |
Definition at line 1233 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 473 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 359 of file tuplestore.c.
References elog(), ERROR, i, and TSS_INMEM.
Referenced by begin_partition(), ExecInitCteScan(), and ExecMaterial().
bool tuplestore_skiptuples | ( | Tuplestorestate * | state, |
int64 | ntuples, | ||
bool | forward | ||
) |
Definition at line 1135 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 1360 of file tuplestore.c.
References Assert(), EXEC_FLAG_REWIND, FREEMEM, GetMemoryChunkSpace(), i, Min, pfree(), and TSS_INMEM.
Referenced by ExecMaterialMarkPos(), and ExecWindowAgg().
int64 tuplestore_tuple_count | ( | Tuplestorestate * | state | ) |
Definition at line 546 of file tuplestore.c.
Referenced by exec_stmt_return_query(), fetch_remote_table_info(), and SPI_register_trigger_data().