static HeapTuple heap_prepare_insert(Relation relation, HeapTuple tup,
- TransactionId xid, CommandId cid, int options);
+ TransactionId xid, CommandId cid, bits32 options);
static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf,
Buffer newbuf, HeapTuple oldtup,
HeapTuple newtup, HeapTuple old_key_tuple,
*/
void
heap_insert(Relation relation, HeapTuple tup, CommandId cid,
- int options, BulkInsertState bistate)
+ bits32 options, BulkInsertState bistate)
{
TransactionId xid = GetCurrentTransactionId();
HeapTuple heaptup;
*/
static HeapTuple
heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid,
- CommandId cid, int options)
+ CommandId cid, bits32 options)
{
/*
* To allow parallel inserts, we need to ensure that they are safe to be
*/
void
heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples,
- CommandId cid, int options, BulkInsertState bistate)
+ CommandId cid, bits32 options, BulkInsertState bistate)
{
TransactionId xid = GetCurrentTransactionId();
HeapTuple *heaptuples;
static void
heapam_tuple_insert(Relation relation, TupleTableSlot *slot, CommandId cid,
- int options, BulkInsertState bistate)
+ bits32 options, BulkInsertState bistate)
{
bool shouldFree = true;
HeapTuple tuple = ExecFetchSlotHeapTuple(slot, true, &shouldFree);
static void
heapam_tuple_insert_speculative(Relation relation, TupleTableSlot *slot,
- CommandId cid, int options,
+ CommandId cid, bits32 options,
BulkInsertState bistate, uint32 specToken)
{
bool shouldFree = true;
extern void ReleaseBulkInsertStatePin(BulkInsertState bistate);
extern void heap_insert(Relation relation, HeapTuple tup, CommandId cid,
- int options, BulkInsertState bistate);
+ bits32 options, BulkInsertState bistate);
extern void heap_multi_insert(Relation relation, TupleTableSlot **slots,
- int ntuples, CommandId cid, int options,
+ int ntuples, CommandId cid, bits32 options,
BulkInsertState bistate);
extern TM_Result heap_delete(Relation relation, const ItemPointerData *tid,
CommandId cid, Snapshot crosscheck, bool wait,
TM_IndexStatus *status;
} TM_IndexDeleteOp;
-/* "options" flag bits for table_tuple_insert */
+/*
+ * "options" flag bits for table_tuple_insert. Access methods may define
+ * their own bits for internal use, as long as they don't collide with these.
+ */
/* TABLE_INSERT_SKIP_WAL was 0x0001; RelationNeedsWAL() now governs */
#define TABLE_INSERT_SKIP_FSM 0x0002
#define TABLE_INSERT_FROZEN 0x0004
/* see table_tuple_insert() for reference about parameters */
void (*tuple_insert) (Relation rel, TupleTableSlot *slot,
- CommandId cid, int options,
+ CommandId cid, bits32 options,
BulkInsertStateData *bistate);
/* see table_tuple_insert_speculative() for reference about parameters */
void (*tuple_insert_speculative) (Relation rel,
TupleTableSlot *slot,
CommandId cid,
- int options,
+ bits32 options,
BulkInsertStateData *bistate,
uint32 specToken);
/* see table_multi_insert() for reference about parameters */
void (*multi_insert) (Relation rel, TupleTableSlot **slots, int nslots,
- CommandId cid, int options, BulkInsertStateData *bistate);
+ CommandId cid, bits32 options, BulkInsertStateData *bistate);
/* see table_tuple_delete() for reference about parameters */
TM_Result (*tuple_delete) (Relation rel,
*
* Optional callback.
*/
- void (*finish_bulk_insert) (Relation rel, int options);
+ void (*finish_bulk_insert) (Relation rel, bits32 options);
/* ------------------------------------------------------------------------
*/
static inline void
table_tuple_insert(Relation rel, TupleTableSlot *slot, CommandId cid,
- int options, BulkInsertStateData *bistate)
+ bits32 options, BulkInsertStateData *bistate)
{
rel->rd_tableam->tuple_insert(rel, slot, cid, options,
bistate);
*/
static inline void
table_tuple_insert_speculative(Relation rel, TupleTableSlot *slot,
- CommandId cid, int options,
+ CommandId cid, bits32 options,
BulkInsertStateData *bistate,
uint32 specToken)
{
*/
static inline void
table_multi_insert(Relation rel, TupleTableSlot **slots, int nslots,
- CommandId cid, int options, BulkInsertStateData *bistate)
+ CommandId cid, bits32 options, BulkInsertStateData *bistate)
{
rel->rd_tableam->multi_insert(rel, slots, nslots,
cid, options, bistate);
* tuple_insert and multi_insert with a BulkInsertState specified.
*/
static inline void
-table_finish_bulk_insert(Relation rel, int options)
+table_finish_bulk_insert(Relation rel, bits32 options)
{
/* optional callback */
if (rel->rd_tableam && rel->rd_tableam->finish_bulk_insert)