1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Inline some small functions called for every row.

This commit is contained in:
Bruce Momjian
1998-04-24 14:43:33 +00:00
parent 7500a961f1
commit 4cbfeef912
11 changed files with 179 additions and 205 deletions

View File

@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.17 1998/02/26 04:31:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.18 1998/04/24 14:41:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -40,10 +40,10 @@
* ExecSetNewSlotDescriptor - set a desc and the is-new-flag all at once
* ExecSlotBuffer - return buffer of tuple in slot
* ExecSetSlotBuffer - set the buffer for tuple in slot
* ExecIncrSlotBufferRefcnt - bump the refcnt of the slot buffer
* ExecIncrSlotBufferRefcnt - bump the refcnt of the slot buffer(Macro)
*
* SLOT STATUS PREDICATES
* TupIsNull - true when slot contains no tuple
* TupIsNull - true when slot contains no tuple(Macro)
* ExecSlotDescriptorIsNew - true if we're now storing a different
* type of tuple in a slot
*
@ -566,59 +566,11 @@ ExecSetSlotBuffer(TupleTableSlot *slot, /* slot to change */
#endif
/* --------------------------------
* ExecIncrSlotBufferRefcnt
*
* When we pass around buffers in the tuple table, we have to
* be careful to increment reference counts appropriately.
* This is used mainly in the mergejoin code.
* --------------------------------
*/
void
ExecIncrSlotBufferRefcnt(TupleTableSlot *slot) /* slot to bump refcnt */
{
/* Buffer b = SlotBuffer((TupleTableSlot*) slot); */
Buffer b = slot->ttc_buffer;
if (BufferIsValid(b))
IncrBufferRefCount(b);
}
/* ----------------------------------------------------------------
* tuple table slot status predicates
* ----------------------------------------------------------------
*/
/* ----------------
* TupIsNull
*
* This is used mainly to detect when there are no more
* tuples to process.
* ----------------
*/
bool /* return: true if tuple in slot is NULL */
TupIsNull(TupleTableSlot *slot) /* slot to check */
{
HeapTuple tuple; /* contents of slot (returned) */
/* ----------------
* if the slot itself is null then we return true
* ----------------
*/
if (slot == NULL)
return true;
/* ----------------
* get information from the slot and return true or
* false depending on the contents of the slot.
* ----------------
*/
tuple = slot->val;
return
(tuple == NULL ? true : false);
}
/* --------------------------------
* ExecSlotDescriptorIsNew
*

View File

@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.16 1998/02/26 04:31:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.17 1998/04/24 14:41:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -27,7 +27,7 @@
#include "utils/palloc.h"
#include "utils/relcache.h"
#include "utils/mcxt.h"
#include "storage/bufmgr.h" /* for IncrBufferRefCount */
#include "storage/bufmgr.h"
#include "storage/smgr.h"
#include "optimizer/internal.h"
#include "executor/executor.h"