src/backend/utils/sort/logtape.c
/*
 * Read a block-sized buffer from the specified block of the underlying file.
 *
 * No need for an error return convention; we ereport() on any error.   This
 * module should never attempt to read a block it doesn't know is there.
 */
Read a block-sized buffer from the specified block of the underlying file.
No need for an error return convention; we ereport() on any error.   This
module should never attempt to read a block it doesn't know is there.
Read a block - sized buffer from the specified block of the underlying file . No need for an error return convention ; we ereport () on any error . This module should never attempt to read a block it doesn ' t know is there .
static void
ltsReadBlock(LogicalTapeSet *lts, long blocknum, void *buffer)
{
	if (BufFileSeekBlock(lts->pfile, blocknum) != 0 ||
		BufFileRead(lts->pfile, buffer, BLCKSZ) != BLCKSZ)
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not read block %ld of temporary file: %m",
						blocknum)));
}
static void ltsReadBlock ( LogicalTapeSet * lts , long blocknum , void * buffer ) { if ( BufFileSeekBlock ( lts -> pfile , blocknum ) != 0 || BufFileRead ( lts -> pfile , buffer , BLCKSZ ) != BLCKSZ ) ereport ( ERROR , ( errcode_for_file_access ( ) , errmsg ( " " , blocknum ) ) ) ; }
Read a block-sized buffer from the specified block of the underlying file.
Read a block - sized buffer from the specified block of the underlying file .