mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
pgindent run before 6.3 release, with Thomas' requested changes.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.36 1998/02/11 19:09:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.37 1998/02/26 04:29:15 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The old interface functions have been converted to macros
|
||||
@@ -34,14 +34,14 @@
|
||||
#endif
|
||||
|
||||
/* Used by heap_getattr() macro, for speed */
|
||||
long heap_sysoffset[] = {
|
||||
long heap_sysoffset[] = {
|
||||
/* Only the first one is pass-by-ref, and is handled specially in the macro */
|
||||
offsetof(HeapTupleData, t_ctid),
|
||||
offsetof(HeapTupleData, t_oid),
|
||||
offsetof(HeapTupleData, t_xmin),
|
||||
offsetof(HeapTupleData, t_cmin),
|
||||
offsetof(HeapTupleData, t_xmax),
|
||||
offsetof(HeapTupleData, t_cmax)
|
||||
offsetof(HeapTupleData, t_ctid),
|
||||
offsetof(HeapTupleData, t_oid),
|
||||
offsetof(HeapTupleData, t_xmin),
|
||||
offsetof(HeapTupleData, t_cmin),
|
||||
offsetof(HeapTupleData, t_xmax),
|
||||
offsetof(HeapTupleData, t_cmax)
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
@@ -350,7 +350,7 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
|
||||
{
|
||||
switch (attnum)
|
||||
{
|
||||
case SelfItemPointerAttributeNumber:
|
||||
case SelfItemPointerAttributeNumber:
|
||||
return ((Datum) &tup->t_ctid);
|
||||
case ObjectIdAttributeNumber:
|
||||
return ((Datum) (long) tup->t_oid);
|
||||
@@ -389,16 +389,16 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
|
||||
*/
|
||||
Datum
|
||||
nocachegetattr(HeapTuple tup,
|
||||
int attnum,
|
||||
TupleDesc tupleDesc,
|
||||
bool *isnull)
|
||||
int attnum,
|
||||
TupleDesc tupleDesc,
|
||||
bool *isnull)
|
||||
{
|
||||
char *tp; /* ptr to att in tuple */
|
||||
bits8 *bp = tup->t_bits; /* ptr to att in tuple */
|
||||
bits8 *bp = tup->t_bits; /* ptr to att in tuple */
|
||||
int slow; /* do we have to walk nulls? */
|
||||
AttributeTupleForm *att = tupleDesc->attrs;
|
||||
|
||||
|
||||
|
||||
#if IN_MACRO
|
||||
/* This is handled in the macro */
|
||||
Assert(attnum > 0);
|
||||
@@ -430,6 +430,7 @@ nocachegetattr(HeapTuple tup,
|
||||
}
|
||||
else if (attnum == 0)
|
||||
{
|
||||
|
||||
/*
|
||||
* first attribute is always at position zero
|
||||
*/
|
||||
@@ -470,11 +471,11 @@ nocachegetattr(HeapTuple tup,
|
||||
* ----------------
|
||||
*/
|
||||
{
|
||||
int i = 0; /* current offset in bp */
|
||||
int mask; /* bit in byte we're looking at */
|
||||
char n; /* current byte in bp */
|
||||
int byte,
|
||||
finalbit;
|
||||
int i = 0; /* current offset in bp */
|
||||
int mask; /* bit in byte we're looking at */
|
||||
char n; /* current byte in bp */
|
||||
int byte,
|
||||
finalbit;
|
||||
|
||||
byte = attnum >> 3;
|
||||
finalbit = attnum & 0x07;
|
||||
@@ -486,14 +487,14 @@ nocachegetattr(HeapTuple tup,
|
||||
{
|
||||
/* check for nulls in any "earlier" bytes */
|
||||
if ((~n) != 0)
|
||||
slow=1;
|
||||
slow = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* check for nulls "before" final bit of last byte */
|
||||
mask = (1 << finalbit) - 1;
|
||||
if ((~n) & mask)
|
||||
slow=1;
|
||||
slow = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -508,8 +509,8 @@ nocachegetattr(HeapTuple tup,
|
||||
{
|
||||
if (att[attnum]->attcacheoff != -1)
|
||||
{
|
||||
return (Datum)fetchatt(&(att[attnum]),
|
||||
tp + att[attnum]->attcacheoff);
|
||||
return (Datum) fetchatt(&(att[attnum]),
|
||||
tp + att[attnum]->attcacheoff);
|
||||
}
|
||||
else if (attnum == 0)
|
||||
{
|
||||
@@ -517,11 +518,11 @@ nocachegetattr(HeapTuple tup,
|
||||
}
|
||||
else if (!HeapTupleAllFixed(tup))
|
||||
{
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
/*
|
||||
* In for(), we make this <= and not < because we want to
|
||||
* test if we can go past it in initializing offsets.
|
||||
* In for(), we make this <= and not < because we want to test
|
||||
* if we can go past it in initializing offsets.
|
||||
*/
|
||||
for (j = 0; j <= attnum && !slow; j++)
|
||||
if (att[j]->attlen < 1 && !VARLENA_FIXED_SIZE(att[j]))
|
||||
@@ -536,8 +537,8 @@ nocachegetattr(HeapTuple tup,
|
||||
*/
|
||||
if (!slow)
|
||||
{
|
||||
int j = 1;
|
||||
long off;
|
||||
int j = 1;
|
||||
long off;
|
||||
|
||||
/*
|
||||
* need to set cache for some atts
|
||||
@@ -554,13 +555,14 @@ nocachegetattr(HeapTuple tup,
|
||||
off = att[j - 1]->attcacheoff + att[j - 1]->atttypmod;
|
||||
|
||||
for (; j <= attnum ||
|
||||
/* Can we compute more? We will probably need them */
|
||||
(j < tup->t_natts &&
|
||||
att[j]->attcacheoff == -1 &&
|
||||
(HeapTupleNoNulls(tup) || !att_isnull(j, bp)) &&
|
||||
(HeapTupleAllFixed(tup)||
|
||||
att[j]->attlen > 0 || VARLENA_FIXED_SIZE(att[j]))); j++)
|
||||
/* Can we compute more? We will probably need them */
|
||||
(j < tup->t_natts &&
|
||||
att[j]->attcacheoff == -1 &&
|
||||
(HeapTupleNoNulls(tup) || !att_isnull(j, bp)) &&
|
||||
(HeapTupleAllFixed(tup) ||
|
||||
att[j]->attlen > 0 || VARLENA_FIXED_SIZE(att[j]))); j++)
|
||||
{
|
||||
|
||||
/*
|
||||
* Fix me when going to a machine with more than a four-byte
|
||||
* word!
|
||||
@@ -605,7 +607,7 @@ nocachegetattr(HeapTuple tup,
|
||||
break;
|
||||
case -1:
|
||||
Assert(!VARLENA_FIXED_SIZE(att[j]) ||
|
||||
att[j]->atttypmod == VARSIZE(tp + off));
|
||||
att[j]->atttypmod == VARSIZE(tp + off));
|
||||
off += VARSIZE(tp + off);
|
||||
break;
|
||||
default:
|
||||
@@ -618,9 +620,9 @@ nocachegetattr(HeapTuple tup,
|
||||
}
|
||||
else
|
||||
{
|
||||
bool usecache = true;
|
||||
int off = 0;
|
||||
int i;
|
||||
bool usecache = true;
|
||||
int off = 0;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Now we know that we have to walk the tuple CAREFULLY.
|
||||
@@ -665,7 +667,7 @@ nocachegetattr(HeapTuple tup,
|
||||
default:
|
||||
if (att[i]->attlen < sizeof(int32))
|
||||
elog(ERROR,
|
||||
"nocachegetattr2: attribute %d has len %d",
|
||||
"nocachegetattr2: attribute %d has len %d",
|
||||
i, att[i]->attlen);
|
||||
if (att[i]->attalign == 'd')
|
||||
off = DOUBLEALIGN(off);
|
||||
@@ -690,7 +692,7 @@ nocachegetattr(HeapTuple tup,
|
||||
break;
|
||||
case -1:
|
||||
Assert(!VARLENA_FIXED_SIZE(att[i]) ||
|
||||
att[i]->atttypmod == VARSIZE(tp + off));
|
||||
att[i]->atttypmod == VARSIZE(tp + off));
|
||||
off += VARSIZE(tp + off);
|
||||
if (!VARLENA_FIXED_SIZE(att[i]))
|
||||
usecache = false;
|
||||
@@ -965,9 +967,9 @@ heap_modifytuple(HeapTuple tuple,
|
||||
* ----------------
|
||||
*/
|
||||
infomask = newTuple->t_infomask;
|
||||
memmove((char *) &newTuple->t_oid, /* XXX */
|
||||
memmove((char *) &newTuple->t_oid, /* XXX */
|
||||
(char *) &tuple->t_oid,
|
||||
((char *) &tuple->t_hoff - (char *) &tuple->t_oid)); /* XXX */
|
||||
((char *) &tuple->t_hoff - (char *) &tuple->t_oid)); /* XXX */
|
||||
newTuple->t_infomask = infomask;
|
||||
newTuple->t_natts = numberOfAttributes; /* fix t_natts just in
|
||||
* case */
|
||||
@@ -993,7 +995,7 @@ heap_addheader(uint32 natts, /* max domain index */
|
||||
int structlen, /* its length */
|
||||
char *structure) /* pointer to the struct */
|
||||
{
|
||||
char *tp; /* tuple data pointer */
|
||||
char *tp; /* tuple data pointer */
|
||||
HeapTuple tup;
|
||||
long len;
|
||||
int hoff;
|
||||
@@ -1018,4 +1020,3 @@ heap_addheader(uint32 natts, /* max domain index */
|
||||
|
||||
return (tup);
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.27 1998/02/11 19:09:23 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.28 1998/02/26 04:29:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ index_formtuple(TupleDesc tupleDescriptor,
|
||||
Datum value[],
|
||||
char null[])
|
||||
{
|
||||
char *tp; /* tuple pointer */
|
||||
char *tp; /* tuple pointer */
|
||||
IndexTuple tuple; /* return tuple */
|
||||
Size size,
|
||||
hoff;
|
||||
@@ -133,14 +133,14 @@ index_formtuple(TupleDesc tupleDescriptor,
|
||||
*/
|
||||
Datum
|
||||
nocache_index_getattr(IndexTuple tup,
|
||||
int attnum,
|
||||
TupleDesc tupleDesc,
|
||||
bool *isnull)
|
||||
int attnum,
|
||||
TupleDesc tupleDesc,
|
||||
bool *isnull)
|
||||
{
|
||||
char *tp; /* ptr to att in tuple */
|
||||
char *bp = NULL; /* ptr to att in tuple */
|
||||
char *tp; /* ptr to att in tuple */
|
||||
char *bp = NULL; /* ptr to att in tuple */
|
||||
int slow; /* do we have to walk nulls? */
|
||||
int data_off; /* tuple data offset */
|
||||
int data_off; /* tuple data offset */
|
||||
AttributeTupleForm *att = tupleDesc->attrs;
|
||||
|
||||
/* ----------------
|
||||
@@ -174,7 +174,7 @@ nocache_index_getattr(IndexTuple tup,
|
||||
|
||||
#ifdef IN_MACRO
|
||||
/* This is handled in the macro */
|
||||
|
||||
|
||||
/* first attribute is always at position zero */
|
||||
|
||||
if (attnum == 1)
|
||||
@@ -184,8 +184,8 @@ nocache_index_getattr(IndexTuple tup,
|
||||
if (att[attnum]->attcacheoff != -1)
|
||||
{
|
||||
return (Datum) fetchatt(&(att[attnum]),
|
||||
(char *) tup + data_off +
|
||||
att[attnum]->attcacheoff);
|
||||
(char *) tup + data_off +
|
||||
att[attnum]->attcacheoff);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -206,11 +206,11 @@ nocache_index_getattr(IndexTuple tup,
|
||||
* here! */
|
||||
#ifdef IN_MACRO
|
||||
/* This is handled in the macro */
|
||||
|
||||
|
||||
if (att_isnull(attnum, bp))
|
||||
{
|
||||
*isnull = true;
|
||||
return (Datum)NULL;
|
||||
return (Datum) NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -219,11 +219,11 @@ nocache_index_getattr(IndexTuple tup,
|
||||
* ----------------
|
||||
*/
|
||||
{
|
||||
int i = 0; /* current offset in bp */
|
||||
int mask; /* bit in byte we're looking at */
|
||||
char n; /* current byte in bp */
|
||||
int byte,
|
||||
finalbit;
|
||||
int i = 0; /* current offset in bp */
|
||||
int mask; /* bit in byte we're looking at */
|
||||
char n; /* current byte in bp */
|
||||
int byte,
|
||||
finalbit;
|
||||
|
||||
byte = attnum >> 3;
|
||||
finalbit = attnum & 0x07;
|
||||
@@ -235,14 +235,14 @@ nocache_index_getattr(IndexTuple tup,
|
||||
{
|
||||
/* check for nulls in any "earlier" bytes */
|
||||
if ((~n) != 0)
|
||||
slow=1;
|
||||
slow = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* check for nulls "before" final bit of last byte */
|
||||
mask = (1 << finalbit) - 1;
|
||||
if ((~n) & mask)
|
||||
slow=1;
|
||||
slow = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -257,7 +257,7 @@ nocache_index_getattr(IndexTuple tup,
|
||||
if (att[attnum]->attcacheoff != -1)
|
||||
{
|
||||
return (Datum) fetchatt(&(att[attnum]),
|
||||
tp + att[attnum]->attcacheoff);
|
||||
tp + att[attnum]->attcacheoff);
|
||||
}
|
||||
else if (attnum == 0)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ nocache_index_getattr(IndexTuple tup,
|
||||
}
|
||||
else if (!IndexTupleAllFixed(tup))
|
||||
{
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
for (j = 0; j < attnum && !slow; j++)
|
||||
if (att[j]->attlen < 1 && !VARLENA_FIXED_SIZE(att[j]))
|
||||
@@ -281,8 +281,8 @@ nocache_index_getattr(IndexTuple tup,
|
||||
|
||||
if (!slow)
|
||||
{
|
||||
int j = 1;
|
||||
long off;
|
||||
int j = 1;
|
||||
long off;
|
||||
|
||||
/*
|
||||
* need to set cache for some atts
|
||||
@@ -293,13 +293,14 @@ nocache_index_getattr(IndexTuple tup,
|
||||
while (att[j]->attcacheoff != -1)
|
||||
j++;
|
||||
|
||||
if (!VARLENA_FIXED_SIZE(att[j-1]))
|
||||
if (!VARLENA_FIXED_SIZE(att[j - 1]))
|
||||
off = att[j - 1]->attcacheoff + att[j - 1]->attlen;
|
||||
else
|
||||
off = att[j - 1]->attcacheoff + att[j - 1]->atttypmod;
|
||||
|
||||
for (; j < attnum + 1; j++)
|
||||
{
|
||||
|
||||
/*
|
||||
* Fix me when going to a machine with more than a four-byte
|
||||
* word!
|
||||
@@ -346,9 +347,9 @@ nocache_index_getattr(IndexTuple tup,
|
||||
}
|
||||
else
|
||||
{
|
||||
bool usecache = true;
|
||||
int off = 0;
|
||||
int i;
|
||||
bool usecache = true;
|
||||
int off = 0;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Now we know that we have to walk the tuple CAREFULLY.
|
||||
@@ -387,7 +388,7 @@ nocache_index_getattr(IndexTuple tup,
|
||||
default:
|
||||
if (att[i]->attlen < sizeof(int32))
|
||||
elog(ERROR,
|
||||
"nocachegetiattr2: attribute %d has len %d",
|
||||
"nocachegetiattr2: attribute %d has len %d",
|
||||
i, att[i]->attlen);
|
||||
if (att[i]->attalign == 'd')
|
||||
off = DOUBLEALIGN(off);
|
||||
@@ -412,7 +413,7 @@ nocache_index_getattr(IndexTuple tup,
|
||||
break;
|
||||
case -1:
|
||||
Assert(!VARLENA_FIXED_SIZE(att[i]) ||
|
||||
att[i]->atttypmod == VARSIZE(tp + off));
|
||||
att[i]->atttypmod == VARSIZE(tp + off));
|
||||
off += VARSIZE(tp + off);
|
||||
if (!VARLENA_FIXED_SIZE(att[i]))
|
||||
usecache = false;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.26 1998/02/11 19:09:25 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.27 1998/02/26 04:29:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -124,7 +124,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
|
||||
{
|
||||
outputstr = fmgr(typoutput, attr,
|
||||
gettypelem(typeinfo->attrs[i]->atttypid),
|
||||
typeinfo->attrs[i]->atttypmod);
|
||||
typeinfo->attrs[i]->atttypmod);
|
||||
pq_putint(strlen(outputstr) + VARHDRSZ, VARHDRSZ);
|
||||
pq_putnchar(outputstr, strlen(outputstr));
|
||||
pfree(outputstr);
|
||||
@@ -176,8 +176,8 @@ showatts(char *name, TupleDesc tupleDesc)
|
||||
void
|
||||
debugtup(HeapTuple tuple, TupleDesc typeinfo)
|
||||
{
|
||||
int i;
|
||||
Datum attr;
|
||||
int i;
|
||||
Datum attr;
|
||||
char *value;
|
||||
bool isnull;
|
||||
Oid typoutput;
|
||||
@@ -191,7 +191,7 @@ debugtup(HeapTuple tuple, TupleDesc typeinfo)
|
||||
{
|
||||
value = fmgr(typoutput, attr,
|
||||
gettypelem(typeinfo->attrs[i]->atttypid),
|
||||
typeinfo->attrs[i]->atttypmod);
|
||||
typeinfo->attrs[i]->atttypmod);
|
||||
printatt((unsigned) i + 1, typeinfo->attrs[i], value);
|
||||
pfree(value);
|
||||
}
|
||||
@@ -313,7 +313,7 @@ printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
|
||||
pq_putnchar(DatumGetPointer(attr), len);
|
||||
#ifdef IPORTAL_DEBUG
|
||||
fprintf(stderr, "byref length %d data %x\n", len,
|
||||
DatumGetPointer(attr));
|
||||
DatumGetPointer(attr));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.35 1998/02/10 16:02:46 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.36 1998/02/26 04:29:22 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@@ -306,7 +306,7 @@ TupleDescInitEntry(TupleDesc desc,
|
||||
att->attnum = attributeNumber;
|
||||
att->attnelems = attdim;
|
||||
att->attisset = attisset;
|
||||
|
||||
|
||||
att->attnotnull = false;
|
||||
att->atthasdef = false;
|
||||
|
||||
@@ -487,7 +487,7 @@ BuildDescForRelation(List *schema, char *relname)
|
||||
if (arry != NIL)
|
||||
{
|
||||
/* array of XXX is _XXX */
|
||||
sprintf(typename, "_%.*s", NAMEDATALEN-2,entry->typename->name);
|
||||
sprintf(typename, "_%.*s", NAMEDATALEN - 2, entry->typename->name);
|
||||
attdim = length(arry);
|
||||
}
|
||||
else
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.17 1997/11/20 23:19:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.18 1998/02/26 04:29:28 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -306,7 +306,7 @@ hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relatio
|
||||
/*
|
||||
* hashgettuple() -- Get the next tuple in the scan.
|
||||
*/
|
||||
char *
|
||||
char *
|
||||
hashgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
{
|
||||
RetrieveIndexResult res;
|
||||
@@ -329,7 +329,7 @@ hashgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
/*
|
||||
* hashbeginscan() -- start a scan on a hash index
|
||||
*/
|
||||
char *
|
||||
char *
|
||||
hashbeginscan(Relation rel,
|
||||
bool fromEnd,
|
||||
uint16 keysz,
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.26 1998/02/11 19:09:30 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.27 1998/02/26 04:29:31 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -654,6 +654,7 @@ heap_beginscan(Relation relation,
|
||||
sdesc->rs_rd = relation;
|
||||
|
||||
if (nkeys)
|
||||
|
||||
/*
|
||||
* we do this here instead of in initsdesc() because heap_rescan
|
||||
* also calls initsdesc() and we don't want to allocate memory
|
||||
@@ -1303,7 +1304,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
|
||||
Page dp;
|
||||
Buffer buffer;
|
||||
HeapTuple tuple;
|
||||
|
||||
|
||||
/* ----------------
|
||||
* increment access statistics
|
||||
* ----------------
|
||||
@@ -1375,13 +1376,13 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
|
||||
* ----------------
|
||||
*/
|
||||
HeapTupleSatisfies(lp,
|
||||
relation,
|
||||
buffer,
|
||||
(PageHeader) dp,
|
||||
false,
|
||||
0,
|
||||
(ScanKey) NULL,
|
||||
tuple);
|
||||
relation,
|
||||
buffer,
|
||||
(PageHeader) dp,
|
||||
false,
|
||||
0,
|
||||
(ScanKey) NULL,
|
||||
tuple);
|
||||
if (!tuple)
|
||||
{
|
||||
ReleaseBuffer(buffer);
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.16 1998/01/15 19:42:02 pgsql Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.17 1998/02/26 04:29:36 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -242,17 +242,17 @@ StrategyTermEvaluate(StrategyTerm term,
|
||||
switch (operator->flags ^ entry->sk_flags)
|
||||
{
|
||||
case 0x0:
|
||||
tmpres = (long) FMGR_PTR2(&entry->sk_func,
|
||||
tmpres = (long) FMGR_PTR2(&entry->sk_func,
|
||||
left, right);
|
||||
break;
|
||||
|
||||
case SK_NEGATE:
|
||||
tmpres = (long) !FMGR_PTR2(&entry->sk_func,
|
||||
tmpres = (long) !FMGR_PTR2(&entry->sk_func,
|
||||
left, right);
|
||||
break;
|
||||
|
||||
case SK_COMMUTE:
|
||||
tmpres = (long) FMGR_PTR2(&entry->sk_func,
|
||||
tmpres = (long) FMGR_PTR2(&entry->sk_func,
|
||||
right, left);
|
||||
break;
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.24 1997/11/20 23:20:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.25 1998/02/26 04:29:44 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -389,7 +389,7 @@ btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
|
||||
/*
|
||||
* btgettuple() -- Get the next tuple in the scan.
|
||||
*/
|
||||
char *
|
||||
char *
|
||||
btgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
{
|
||||
RetrieveIndexResult res;
|
||||
@@ -411,7 +411,7 @@ btgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
/*
|
||||
* btbeginscan() -- start a scan on a btree index
|
||||
*/
|
||||
char *
|
||||
char *
|
||||
btbeginscan(Relation rel, bool fromEnd, uint16 keysz, ScanKey scankey)
|
||||
{
|
||||
IndexScanDesc scan;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.30 1998/01/15 19:42:13 pgsql Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.31 1998/02/26 04:29:50 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -197,12 +197,11 @@ _bt_moveright(Relation rel,
|
||||
* if number of attrs > keysize. Example: (2,0) - last items
|
||||
* on this page, (2,1) - first item on next page (hikey), our
|
||||
* scankey is x = 2. Scankey == (2,1) because of we compare
|
||||
* first attrs only, but we shouldn't to move right of here.
|
||||
* - vadim 04/15/97
|
||||
*
|
||||
* first attrs only, but we shouldn't to move right of here. -
|
||||
* vadim 04/15/97
|
||||
*
|
||||
* Also, if this page is not LEAF one (and # of attrs > keysize)
|
||||
* then we can't move too.
|
||||
* - vadim 10/22/97
|
||||
* then we can't move too. - vadim 10/22/97
|
||||
*/
|
||||
|
||||
if (_bt_skeycmp(rel, keysz, scankey, page, hikey,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: nbtsort.c,v 1.28 1998/02/21 19:23:14 scrappy Exp $
|
||||
* $Id: nbtsort.c,v 1.29 1998/02/26 04:29:54 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -553,7 +553,7 @@ _bt_tapeadd(BTTapeBlock *tape, BTItem item, int itemsz)
|
||||
* create and initialize a spool structure, including the underlying
|
||||
* files.
|
||||
*/
|
||||
void *
|
||||
void *
|
||||
_bt_spoolinit(Relation index, int ntapes, bool isunique)
|
||||
{
|
||||
BTSpool *btspool = (BTSpool *) palloc(sizeof(BTSpool));
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.15 1998/01/07 21:02:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.16 1998/02/26 04:30:06 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ rt_box_union(BOX *a, BOX *b)
|
||||
return (n);
|
||||
}
|
||||
|
||||
BOX *
|
||||
BOX *
|
||||
rt_box_inter(BOX *a, BOX *b)
|
||||
{
|
||||
BOX *n;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.22 1998/01/15 19:42:19 pgsql Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.23 1998/02/26 04:30:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -956,7 +956,7 @@ freestack(RTSTACK *s)
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
char *
|
||||
rtdelete(Relation r, ItemPointer tid)
|
||||
{
|
||||
BlockNumber blkno;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.16 1998/01/07 21:02:17 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.17 1998/02/26 04:30:18 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains the high level access-method interface to the
|
||||
@@ -47,8 +47,8 @@ Relation VariableRelation = (Relation) NULL;
|
||||
* global variables holding cached transaction id's and statuses.
|
||||
* ----------------
|
||||
*/
|
||||
TransactionId cachedTestXid;
|
||||
XidStatus cachedTestXidStatus;
|
||||
TransactionId cachedTestXid;
|
||||
XidStatus cachedTestXidStatus;
|
||||
|
||||
/* ----------------
|
||||
* transaction system constants
|
||||
@@ -416,14 +416,14 @@ InitializeTransactionLog(void)
|
||||
VariableRelation = heap_openr(VariableRelationName);
|
||||
/* ----------------
|
||||
* XXX TransactionLogUpdate requires that LogRelation
|
||||
* is valid so we temporarily set it so we can initialize
|
||||
* is valid so we temporarily set it so we can initialize
|
||||
* things properly. This could be done cleaner.
|
||||
* ----------------
|
||||
*/
|
||||
LogRelation = logRelation;
|
||||
|
||||
/* ----------------
|
||||
* if we have a virgin database, we initialize the log
|
||||
* if we have a virgin database, we initialize the log
|
||||
* relation by committing the AmiTransactionId (id 512) and we
|
||||
* initialize the variable relation by setting the next available
|
||||
* transaction id to FirstTransactionId (id 514). OID initialization
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.11 1997/11/02 15:24:47 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.12 1998/02/26 04:30:19 momjian Exp $
|
||||
*
|
||||
* OLD COMMENTS
|
||||
* XXX WARNING
|
||||
@@ -38,7 +38,7 @@ xidin(char *representation)
|
||||
}
|
||||
|
||||
/* XXX char16 name for catalogs */
|
||||
char *
|
||||
char *
|
||||
xidout(TransactionId transactionId)
|
||||
{
|
||||
/* return(TransactionIdFormString(transactionId)); */
|
||||
|
Reference in New Issue
Block a user