PostgreSQL Source Code: src/backend/access/table/tableamapi.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

13

19

20

21

22

23

24

25

26

29{

32

35

37 elog(ERROR, "table access method handler %u did not return a TableAmRoutine struct",

38 amhandler);

39

40

41

42

43

44

49

53

58

64

66

67

68

69

70

73

78

88

91

93

96

97 return routine;

98}

99

100

101bool

103{

104 if (**newval == '\0')

105 {

107 "default_table_access_method");

108 return false;

109 }

110

112 {

114 "default_table_access_method", NAMEDATALEN - 1);

115 return false;

116 }

117

118

119

120

121

122

124 {

126 {

127

128

129

130

131

133 {

135 (errcode(ERRCODE_UNDEFINED_OBJECT),

136 errmsg("table access method \"%s\" does not exist",

138 }

139 else

140 {

143 return false;

144 }

145 }

146 }

147

148 return true;

149}

Oid get_table_am_oid(const char *amname, bool missing_ok)

#define OidIsValid(objectId)

int errcode(int sqlerrcode)

int errmsg(const char *fmt,...)

#define ereport(elevel,...)

#define OidFunctionCall0(functionId)

#define GUC_check_errdetail

Assert(PointerIsAligned(start, uint64))

#define IsA(nodeptr, _type_)

static rewind_source * source

static Pointer DatumGetPointer(Datum X)

Size(* parallelscan_initialize)(Relation rel, ParallelTableScanDesc pscan)

void(* relation_copy_data)(Relation rel, const RelFileLocator *newrlocator)

bool(* scan_sample_next_tuple)(TableScanDesc scan, struct SampleScanState *scanstate, TupleTableSlot *slot)

void(* index_fetch_reset)(struct IndexFetchTableData *data)

void(* tuple_complete_speculative)(Relation rel, TupleTableSlot *slot, uint32 specToken, bool succeeded)

void(* parallelscan_reinitialize)(Relation rel, ParallelTableScanDesc pscan)

void(* tuple_get_latest_tid)(TableScanDesc scan, ItemPointer tid)

void(* relation_copy_for_cluster)(Relation OldTable, Relation NewTable, Relation OldIndex, bool use_sort, TransactionId OldestXmin, TransactionId *xid_cutoff, MultiXactId *multi_cutoff, double *num_tuples, double *tups_vacuumed, double *tups_recently_dead)

void(* relation_estimate_size)(Relation rel, int32 *attr_widths, BlockNumber *pages, double *tuples, double *allvisfrac)

double(* index_build_range_scan)(Relation table_rel, Relation index_rel, struct IndexInfo *index_info, bool allow_sync, bool anyvisible, bool progress, BlockNumber start_blockno, BlockNumber numblocks, IndexBuildCallback callback, void *callback_state, TableScanDesc scan)

TableScanDesc(* scan_begin)(Relation rel, Snapshot snapshot, int nkeys, struct ScanKeyData *key, ParallelTableScanDesc pscan, uint32 flags)

bool(* relation_needs_toast_table)(Relation rel)

bool(* tuple_tid_valid)(TableScanDesc scan, ItemPointer tid)

void(* multi_insert)(Relation rel, TupleTableSlot **slots, int nslots, CommandId cid, int options, struct BulkInsertStateData *bistate)

void(* scan_end)(TableScanDesc scan)

uint64(* relation_size)(Relation rel, ForkNumber forkNumber)

TM_Result(* tuple_lock)(Relation rel, ItemPointer tid, Snapshot snapshot, TupleTableSlot *slot, CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy, uint8 flags, TM_FailureData *tmfd)

bool(* scan_sample_next_block)(TableScanDesc scan, struct SampleScanState *scanstate)

void(* relation_nontransactional_truncate)(Relation rel)

TM_Result(* tuple_update)(Relation rel, ItemPointer otid, TupleTableSlot *slot, CommandId cid, Snapshot snapshot, Snapshot crosscheck, bool wait, TM_FailureData *tmfd, LockTupleMode *lockmode, TU_UpdateIndexes *update_indexes)

void(* tuple_insert)(Relation rel, TupleTableSlot *slot, CommandId cid, int options, struct BulkInsertStateData *bistate)

void(* scan_rescan)(TableScanDesc scan, struct ScanKeyData *key, bool set_params, bool allow_strat, bool allow_sync, bool allow_pagemode)

bool(* tuple_fetch_row_version)(Relation rel, ItemPointer tid, Snapshot snapshot, TupleTableSlot *slot)

void(* relation_vacuum)(Relation rel, struct VacuumParams *params, BufferAccessStrategy bstrategy)

bool(* scan_analyze_next_block)(TableScanDesc scan, ReadStream *stream)

Size(* parallelscan_estimate)(Relation rel)

void(* relation_set_new_filelocator)(Relation rel, const RelFileLocator *newrlocator, char persistence, TransactionId *freezeXid, MultiXactId *minmulti)

struct IndexFetchTableData *(* index_fetch_begin)(Relation rel)

bool(* scan_analyze_next_tuple)(TableScanDesc scan, TransactionId OldestXmin, double *liverows, double *deadrows, TupleTableSlot *slot)

TransactionId(* index_delete_tuples)(Relation rel, TM_IndexDeleteOp *delstate)

void(* index_fetch_end)(struct IndexFetchTableData *data)

bool(* index_fetch_tuple)(struct IndexFetchTableData *scan, ItemPointer tid, Snapshot snapshot, TupleTableSlot *slot, bool *call_again, bool *all_dead)

void(* tuple_insert_speculative)(Relation rel, TupleTableSlot *slot, CommandId cid, int options, struct BulkInsertStateData *bistate, uint32 specToken)

TM_Result(* tuple_delete)(Relation rel, ItemPointer tid, CommandId cid, Snapshot snapshot, Snapshot crosscheck, bool wait, TM_FailureData *tmfd, bool changingPart)

void(* index_validate_scan)(Relation table_rel, Relation index_rel, struct IndexInfo *index_info, Snapshot snapshot, struct ValidateIndexState *state)

bool(* scan_getnextslot)(TableScanDesc scan, ScanDirection direction, TupleTableSlot *slot)

bool(* tuple_satisfies_snapshot)(Relation rel, TupleTableSlot *slot, Snapshot snapshot)

bool check_default_table_access_method(char **newval, void **extra, GucSource source)

const TableAmRoutine * GetTableAmRoutine(Oid amhandler)

bool IsTransactionState(void)