mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +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:
@ -420,13 +420,13 @@ heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc)
|
||||
* ----------------
|
||||
*/
|
||||
Datum
|
||||
nocachegetattr(HeapTuple tuple,
|
||||
nocachegetattr(HeapTuple tup,
|
||||
int attnum,
|
||||
TupleDesc tupleDesc)
|
||||
{
|
||||
HeapTupleHeader tup = tuple->t_data;
|
||||
HeapTupleHeader td = tup->t_data;
|
||||
char *tp; /* ptr to data part of tuple */
|
||||
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
|
||||
bits8 *bp = td->t_bits; /* ptr to null bitmap in tuple */
|
||||
bool slow = false; /* do we have to walk attrs? */
|
||||
int off; /* current offset within data */
|
||||
|
||||
@ -441,7 +441,7 @@ nocachegetattr(HeapTuple tuple,
|
||||
|
||||
attnum--;
|
||||
|
||||
if (!HeapTupleNoNulls(tuple))
|
||||
if (!HeapTupleNoNulls(tup))
|
||||
{
|
||||
/*
|
||||
* there's a null somewhere in the tuple
|
||||
@ -470,7 +470,7 @@ nocachegetattr(HeapTuple tuple,
|
||||
}
|
||||
}
|
||||
|
||||
tp = (char *) tup + tup->t_hoff;
|
||||
tp = (char *) td + td->t_hoff;
|
||||
|
||||
if (!slow)
|
||||
{
|
||||
@ -489,7 +489,7 @@ nocachegetattr(HeapTuple tuple,
|
||||
* target. If there aren't any, it's safe to cheaply initialize the
|
||||
* cached offsets for these attrs.
|
||||
*/
|
||||
if (HeapTupleHasVarWidth(tuple))
|
||||
if (HeapTupleHasVarWidth(tup))
|
||||
{
|
||||
int j;
|
||||
|
||||
@ -565,7 +565,7 @@ nocachegetattr(HeapTuple tuple,
|
||||
{
|
||||
Form_pg_attribute att = TupleDescAttr(tupleDesc, i);
|
||||
|
||||
if (HeapTupleHasNulls(tuple) && att_isnull(i, bp))
|
||||
if (HeapTupleHasNulls(tup) && att_isnull(i, bp))
|
||||
{
|
||||
usecache = false;
|
||||
continue; /* this cannot be the target att */
|
||||
|
Reference in New Issue
Block a user