mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Harmonize heapam and tableam parameter names.
Make sure that function declarations use names that exactly match the corresponding names from function definitions. Having parameter names that are reliably consistent in this way will make it easier to reason about groups of related C functions from the same translation unit as a module. It will also make certain refactoring tasks easier. Like other recent commits that cleaned up function parameter names, this commit was written with help from clang-tidy. Later commits will do the same for other parts of the codebase. Author: Peter Geoghegan <pg@bowt.ie> Reviewed-By: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
This commit is contained in:
@@ -118,13 +118,13 @@ extern TableScanDesc heap_beginscan(Relation relation, Snapshot snapshot,
|
||||
int nkeys, ScanKey key,
|
||||
ParallelTableScanDesc parallel_scan,
|
||||
uint32 flags);
|
||||
extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
|
||||
extern void heap_setscanlimits(TableScanDesc sscan, BlockNumber startBlk,
|
||||
BlockNumber numBlks);
|
||||
extern void heapgetpage(TableScanDesc scan, BlockNumber page);
|
||||
extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params,
|
||||
extern void heapgetpage(TableScanDesc sscan, BlockNumber page);
|
||||
extern void heap_rescan(TableScanDesc sscan, ScanKey key, bool set_params,
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
extern void heap_endscan(TableScanDesc scan);
|
||||
extern HeapTuple heap_getnext(TableScanDesc scan, ScanDirection direction);
|
||||
extern void heap_endscan(TableScanDesc sscan);
|
||||
extern HeapTuple heap_getnext(TableScanDesc sscan, ScanDirection direction);
|
||||
extern bool heap_getnextslot(TableScanDesc sscan,
|
||||
ScanDirection direction, struct TupleTableSlot *slot);
|
||||
extern void heap_set_tidrange(TableScanDesc sscan, ItemPointer mintid,
|
||||
@@ -138,7 +138,7 @@ extern bool heap_hot_search_buffer(ItemPointer tid, Relation relation,
|
||||
Buffer buffer, Snapshot snapshot, HeapTuple heapTuple,
|
||||
bool *all_dead, bool first_call);
|
||||
|
||||
extern void heap_get_latest_tid(TableScanDesc scan, ItemPointer tid);
|
||||
extern void heap_get_latest_tid(TableScanDesc sscan, ItemPointer tid);
|
||||
|
||||
extern BulkInsertState GetBulkInsertState(void);
|
||||
extern void FreeBulkInsertState(BulkInsertState);
|
||||
@@ -160,7 +160,7 @@ extern TM_Result heap_update(Relation relation, ItemPointer otid,
|
||||
struct TM_FailureData *tmfd, LockTupleMode *lockmode);
|
||||
extern TM_Result heap_lock_tuple(Relation relation, HeapTuple tuple,
|
||||
CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy,
|
||||
bool follow_update,
|
||||
bool follow_updates,
|
||||
Buffer *buffer, struct TM_FailureData *tmfd);
|
||||
|
||||
extern void heap_inplace_update(Relation relation, HeapTuple tuple);
|
||||
@@ -187,7 +187,7 @@ extern void heap_page_prune_opt(Relation relation, Buffer buffer);
|
||||
extern int heap_page_prune(Relation relation, Buffer buffer,
|
||||
struct GlobalVisState *vistest,
|
||||
TransactionId old_snap_xmin,
|
||||
TimestampTz old_snap_ts_ts,
|
||||
TimestampTz old_snap_ts,
|
||||
int *nnewlpdead,
|
||||
OffsetNumber *off_loc);
|
||||
extern void heap_page_prune_execute(Buffer buffer,
|
||||
@@ -202,13 +202,13 @@ extern void heap_vacuum_rel(Relation rel,
|
||||
struct VacuumParams *params, BufferAccessStrategy bstrategy);
|
||||
|
||||
/* in heap/heapam_visibility.c */
|
||||
extern bool HeapTupleSatisfiesVisibility(HeapTuple stup, Snapshot snapshot,
|
||||
extern bool HeapTupleSatisfiesVisibility(HeapTuple htup, Snapshot snapshot,
|
||||
Buffer buffer);
|
||||
extern TM_Result HeapTupleSatisfiesUpdate(HeapTuple stup, CommandId curcid,
|
||||
extern TM_Result HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
|
||||
Buffer buffer);
|
||||
extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTuple stup, TransactionId OldestXmin,
|
||||
extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTuple htup, TransactionId OldestXmin,
|
||||
Buffer buffer);
|
||||
extern HTSV_Result HeapTupleSatisfiesVacuumHorizon(HeapTuple stup, Buffer buffer,
|
||||
extern HTSV_Result HeapTupleSatisfiesVacuumHorizon(HeapTuple htup, Buffer buffer,
|
||||
TransactionId *dead_after);
|
||||
extern void HeapTupleSetHintBits(HeapTupleHeader tuple, Buffer buffer,
|
||||
uint16 infomask, TransactionId xid);
|
||||
@@ -227,7 +227,7 @@ extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data,
|
||||
HeapTuple htup,
|
||||
Buffer buffer,
|
||||
CommandId *cmin, CommandId *cmax);
|
||||
extern void HeapCheckForSerializableConflictOut(bool valid, Relation relation, HeapTuple tuple,
|
||||
extern void HeapCheckForSerializableConflictOut(bool visible, Relation relation, HeapTuple tuple,
|
||||
Buffer buffer, Snapshot snapshot);
|
||||
|
||||
#endif /* HEAPAM_H */
|
||||
|
@@ -414,8 +414,8 @@ extern bool heap_prepare_freeze_tuple(HeapTupleHeader tuple,
|
||||
TransactionId *relfrozenxid_out,
|
||||
MultiXactId *relminmxid_out);
|
||||
extern void heap_execute_freeze_tuple(HeapTupleHeader tuple,
|
||||
xl_heap_freeze_tuple *xlrec_tp);
|
||||
xl_heap_freeze_tuple *frz);
|
||||
extern XLogRecPtr log_heap_visible(RelFileLocator rlocator, Buffer heap_buffer,
|
||||
Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags);
|
||||
Buffer vm_buffer, TransactionId cutoff_xid, uint8 vmflags);
|
||||
|
||||
#endif /* HEAPAM_XLOG_H */
|
||||
|
@@ -699,7 +699,7 @@ extern void heap_fill_tuple(TupleDesc tupleDesc,
|
||||
uint16 *infomask, bits8 *bit);
|
||||
extern bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc);
|
||||
extern Datum nocachegetattr(HeapTuple tup, int attnum,
|
||||
TupleDesc att);
|
||||
TupleDesc tupleDesc);
|
||||
extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
|
||||
bool *isnull);
|
||||
extern Datum getmissingattr(TupleDesc tupleDesc,
|
||||
|
@@ -112,8 +112,8 @@ extern MultiXactId ReadNextMultiXactId(void);
|
||||
extern void ReadMultiXactIdRange(MultiXactId *oldest, MultiXactId *next);
|
||||
extern bool MultiXactIdIsRunning(MultiXactId multi, bool isLockOnly);
|
||||
extern void MultiXactIdSetOldestMember(void);
|
||||
extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids,
|
||||
bool allow_old, bool isLockOnly);
|
||||
extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members,
|
||||
bool from_pgupgrade, bool isLockOnly);
|
||||
extern bool MultiXactIdPrecedes(MultiXactId multi1, MultiXactId multi2);
|
||||
extern bool MultiXactIdPrecedesOrEquals(MultiXactId multi1,
|
||||
MultiXactId multi2);
|
||||
@@ -140,7 +140,8 @@ extern void MultiXactGetCheckptMulti(bool is_shutdown,
|
||||
Oid *oldestMultiDB);
|
||||
extern void CheckPointMultiXact(void);
|
||||
extern MultiXactId GetOldestMultiXactId(void);
|
||||
extern void TruncateMultiXact(MultiXactId oldestMulti, Oid oldestMultiDB);
|
||||
extern void TruncateMultiXact(MultiXactId newOldestMulti,
|
||||
Oid newOldestMultiDB);
|
||||
extern void MultiXactSetNextMXact(MultiXactId nextMulti,
|
||||
MultiXactOffset nextMultiOffset);
|
||||
extern void MultiXactAdvanceNextMXact(MultiXactId minMulti,
|
||||
|
@@ -21,13 +21,13 @@
|
||||
/* struct definition is private to rewriteheap.c */
|
||||
typedef struct RewriteStateData *RewriteState;
|
||||
|
||||
extern RewriteState begin_heap_rewrite(Relation OldHeap, Relation NewHeap,
|
||||
TransactionId OldestXmin, TransactionId FreezeXid,
|
||||
MultiXactId MultiXactCutoff);
|
||||
extern RewriteState begin_heap_rewrite(Relation old_heap, Relation new_heap,
|
||||
TransactionId oldest_xmin, TransactionId freeze_xid,
|
||||
MultiXactId cutoff_multi);
|
||||
extern void end_heap_rewrite(RewriteState state);
|
||||
extern void rewrite_heap_tuple(RewriteState state, HeapTuple oldTuple,
|
||||
HeapTuple newTuple);
|
||||
extern bool rewrite_heap_dead_tuple(RewriteState state, HeapTuple oldTuple);
|
||||
extern void rewrite_heap_tuple(RewriteState state, HeapTuple old_tuple,
|
||||
HeapTuple new_tuple);
|
||||
extern bool rewrite_heap_dead_tuple(RewriteState state, HeapTuple old_tuple);
|
||||
|
||||
/*
|
||||
* On-Disk data format for an individual logical rewrite mapping.
|
||||
|
@@ -863,13 +863,13 @@ typedef struct TableAmRoutine
|
||||
* for the relation. Works for tables, views, foreign tables and partitioned
|
||||
* tables.
|
||||
*/
|
||||
extern const TupleTableSlotOps *table_slot_callbacks(Relation rel);
|
||||
extern const TupleTableSlotOps *table_slot_callbacks(Relation relation);
|
||||
|
||||
/*
|
||||
* Returns slot using the callbacks returned by table_slot_callbacks(), and
|
||||
* registers it on *reglist.
|
||||
*/
|
||||
extern TupleTableSlot *table_slot_create(Relation rel, List **reglist);
|
||||
extern TupleTableSlot *table_slot_create(Relation relation, List **reglist);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
@@ -895,7 +895,7 @@ table_beginscan(Relation rel, Snapshot snapshot,
|
||||
* Like table_beginscan(), but for scanning catalog. It'll automatically use a
|
||||
* snapshot appropriate for scanning catalog relations.
|
||||
*/
|
||||
extern TableScanDesc table_beginscan_catalog(Relation rel, int nkeys,
|
||||
extern TableScanDesc table_beginscan_catalog(Relation relation, int nkeys,
|
||||
struct ScanKeyData *key);
|
||||
|
||||
/*
|
||||
@@ -1133,7 +1133,7 @@ extern void table_parallelscan_initialize(Relation rel,
|
||||
*
|
||||
* Caller must hold a suitable lock on the relation.
|
||||
*/
|
||||
extern TableScanDesc table_beginscan_parallel(Relation rel,
|
||||
extern TableScanDesc table_beginscan_parallel(Relation relation,
|
||||
ParallelTableScanDesc pscan);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user