src/backend/utils/sort/logtape.c
/*
 * Obtain current position in a form suitable for a later LogicalTapeSeek.
 *
 * NOTE: it'd be OK to do this during write phase with intention of using
 * the position for a seek after freezing.  Not clear if anyone needs that.
 */
Obtain current position in a form suitable for a later LogicalTapeSeek.
NOTE: it'd be OK to do this during write phase with intention of using
the position for a seek after freezing.  Not clear if anyone needs that.
Obtain current position in a form suitable for a later LogicalTapeSeek . NOTE : it ' d be OK to do this during write phase with intention of using the position for a seek after freezing . Not clear if anyone needs that .
void
LogicalTapeTell(LogicalTapeSet *lts, int tapenum,
				long *blocknum, int *offset)
{
	LogicalTape *lt;
	Assert(tapenum >= 0 && tapenum < lts->nTapes);
	lt = &lts->tapes[tapenum];
	Assert(lt->buffer_size == BLCKSZ);
	*blocknum = lt->curBlockNumber;
	*offset = lt->pos;
}
void LogicalTapeTell ( LogicalTapeSet * lts , int tapenum , long * blocknum , int * offset ) { LogicalTape * lt ; Assert ( tapenum >= 0 && tapenum < lts -> nTapes ) ; lt = & lts -> tapes [ tapenum ] ; Assert ( lt -> buffer_size == BLCKSZ ) ; * blocknum = lt -> curBlockNumber ; * offset = lt -> pos ; }
Obtain current position in a form suitable for a later LogicalTapeSeek.
Obtain current position in a form suitable for a later LogicalTapeSeek .
/* With a larger buffer, 'pos' wouldn't be the same as offset within page */