mirror of
https://github.com/postgres/postgres.git
synced 2025-11-01 21:31:19 +03:00
Used modified version of indent that understands over 100 typedefs.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.23 1997/09/08 02:19:47 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.24 1997/09/08 21:40:18 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The old interface functions have been converted to macros
|
||||
@@ -116,7 +116,7 @@ DataFill(char *data,
|
||||
Datum value[],
|
||||
char nulls[],
|
||||
char *infomask,
|
||||
bits8 * bit)
|
||||
bits8 *bit)
|
||||
{
|
||||
bits8 *bitP = 0;
|
||||
int bitmask = 0;
|
||||
@@ -448,7 +448,7 @@ char *
|
||||
fastgetattr(HeapTuple tup,
|
||||
int attnum,
|
||||
TupleDesc tupleDesc,
|
||||
bool * isnull)
|
||||
bool *isnull)
|
||||
{
|
||||
char *tp; /* ptr to att in tuple */
|
||||
bits8 *bp = NULL; /* ptr to att in tuple */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.17 1997/09/08 02:19:54 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.18 1997/09/08 21:40:24 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -29,7 +29,7 @@
|
||||
static Size IndexInfoFindDataOffset(unsigned short t_info);
|
||||
static char *
|
||||
fastgetiattr(IndexTuple tup, int attnum,
|
||||
TupleDesc att, bool * isnull);
|
||||
TupleDesc att, bool *isnull);
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* index_ tuple interface routines
|
||||
@@ -137,7 +137,7 @@ static char *
|
||||
fastgetiattr(IndexTuple tup,
|
||||
int attnum,
|
||||
TupleDesc tupleDesc,
|
||||
bool * isnull)
|
||||
bool *isnull)
|
||||
{
|
||||
register char *tp; /* ptr to att in tuple */
|
||||
register char *bp = NULL; /* ptr to att in tuple */
|
||||
@@ -368,7 +368,7 @@ fastgetiattr(IndexTuple tup,
|
||||
off = SHORTALIGN(off) +sizeof(short);
|
||||
break;
|
||||
case sizeof(int32):
|
||||
off = INTALIGN(off) + sizeof(int32);
|
||||
off = INTALIGN(off) +sizeof(int32);
|
||||
break;
|
||||
case -1:
|
||||
usecache = false;
|
||||
@@ -430,7 +430,7 @@ Datum
|
||||
index_getattr(IndexTuple tuple,
|
||||
AttrNumber attNum,
|
||||
TupleDesc tupDesc,
|
||||
bool * isNullOutP)
|
||||
bool *isNullOutP)
|
||||
{
|
||||
Assert(attNum > 0);
|
||||
|
||||
@@ -483,7 +483,7 @@ IndexInfoFindDataOffset(unsigned short t_info)
|
||||
* we assume we have space that is already palloc'ed.
|
||||
*/
|
||||
void
|
||||
CopyIndexTuple(IndexTuple source, IndexTuple * target)
|
||||
CopyIndexTuple(IndexTuple source, IndexTuple *target)
|
||||
{
|
||||
Size size;
|
||||
IndexTuple ret;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.22 1997/09/08 20:53:40 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.23 1997/09/08 21:40:27 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@@ -437,7 +437,7 @@ TupleDescMakeSelfReference(TupleDesc desc,
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
TupleDesc
|
||||
BuildDescForRelation(List * schema, char *relname)
|
||||
BuildDescForRelation(List *schema, char *relname)
|
||||
{
|
||||
int natts;
|
||||
AttrNumber attnum;
|
||||
|
||||
@@ -34,42 +34,42 @@
|
||||
/* non-export function prototypes */
|
||||
static InsertIndexResult
|
||||
gistdoinsert(Relation r, IndexTuple itup,
|
||||
GISTSTATE * GISTstate);
|
||||
GISTSTATE *GISTstate);
|
||||
static InsertIndexResult
|
||||
gistentryinsert(Relation r, GISTSTACK * stk,
|
||||
gistentryinsert(Relation r, GISTSTACK *stk,
|
||||
IndexTuple tup,
|
||||
GISTSTATE * giststate);
|
||||
GISTSTATE *giststate);
|
||||
static void
|
||||
gistentryinserttwo(Relation r, GISTSTACK * stk, IndexTuple ltup,
|
||||
IndexTuple rtup, GISTSTATE * giststate);
|
||||
gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
|
||||
IndexTuple rtup, GISTSTATE *giststate);
|
||||
static void
|
||||
gistAdjustKeys(Relation r, GISTSTACK * stk, BlockNumber blk,
|
||||
char *datum, int att_size, GISTSTATE * giststate);
|
||||
gistAdjustKeys(Relation r, GISTSTACK *stk, BlockNumber blk,
|
||||
char *datum, int att_size, GISTSTATE *giststate);
|
||||
static void
|
||||
gistintinsert(Relation r, GISTSTACK * stk, IndexTuple ltup,
|
||||
IndexTuple rtup, GISTSTATE * giststate);
|
||||
gistintinsert(Relation r, GISTSTACK *stk, IndexTuple ltup,
|
||||
IndexTuple rtup, GISTSTATE *giststate);
|
||||
static InsertIndexResult
|
||||
gistSplit(Relation r, Buffer buffer,
|
||||
GISTSTACK * stack, IndexTuple itup,
|
||||
GISTSTATE * giststate);
|
||||
GISTSTACK *stack, IndexTuple itup,
|
||||
GISTSTATE *giststate);
|
||||
static void
|
||||
gistnewroot(GISTSTATE * giststate, Relation r, IndexTuple lt,
|
||||
gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt,
|
||||
IndexTuple rt);
|
||||
static void GISTInitBuffer(Buffer b, uint32 f);
|
||||
static BlockNumber
|
||||
gistChooseSubtree(Relation r, IndexTuple itup, int level,
|
||||
GISTSTATE * giststate,
|
||||
GISTSTACK ** retstack, Buffer *leafbuf);
|
||||
GISTSTATE *giststate,
|
||||
GISTSTACK **retstack, Buffer *leafbuf);
|
||||
static OffsetNumber
|
||||
gistchoose(Relation r, Page p, IndexTuple it,
|
||||
GISTSTATE * giststate);
|
||||
GISTSTATE *giststate);
|
||||
static int gistnospace(Page p, IndexTuple it);
|
||||
void gistdelete(Relation r, ItemPointer tid);
|
||||
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t);
|
||||
static void
|
||||
gistcentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr,
|
||||
gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
|
||||
Relation r, Page pg, OffsetNumber o, int b, bool l);
|
||||
static char *int_range_out(INTRANGE * r);
|
||||
static char *int_range_out(INTRANGE *r);
|
||||
|
||||
/*
|
||||
** routine to build an index. Basically calls insert over and over
|
||||
@@ -81,9 +81,9 @@ gistbuild(Relation heap,
|
||||
AttrNumber *attnum,
|
||||
IndexStrategy istrat,
|
||||
uint16 pint,
|
||||
Datum * params,
|
||||
FuncIndexInfo * finfo,
|
||||
PredInfo * predInfo)
|
||||
Datum *params,
|
||||
FuncIndexInfo *finfo,
|
||||
PredInfo *predInfo)
|
||||
{
|
||||
HeapScanDesc scan;
|
||||
Buffer buffer;
|
||||
@@ -328,7 +328,7 @@ gistbuild(Relation heap,
|
||||
* It doesn't do any work; just locks the relation and passes the buck.
|
||||
*/
|
||||
InsertIndexResult
|
||||
gistinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
{
|
||||
InsertIndexResult res;
|
||||
IndexTuple itup;
|
||||
@@ -374,15 +374,15 @@ gistinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation
|
||||
** on the page, for example, or do something special for leaf nodes.)
|
||||
*/
|
||||
static OffsetNumber
|
||||
gistPageAddItem(GISTSTATE * giststate,
|
||||
gistPageAddItem(GISTSTATE *giststate,
|
||||
Relation r,
|
||||
Page page,
|
||||
Item item,
|
||||
Size size,
|
||||
OffsetNumber offsetNumber,
|
||||
ItemIdFlags flags,
|
||||
GISTENTRY * dentry,
|
||||
IndexTuple * newtup)
|
||||
GISTENTRY *dentry,
|
||||
IndexTuple *newtup)
|
||||
{
|
||||
GISTENTRY tmpcentry;
|
||||
IndexTuple itup = (IndexTuple) item;
|
||||
@@ -403,7 +403,7 @@ gistPageAddItem(GISTSTATE * giststate,
|
||||
&& tmpcentry.pred != (((char *) itup) + sizeof(IndexTupleData)))
|
||||
pfree(tmpcentry.pred);
|
||||
|
||||
return (PageAddItem(page, (Item) * newtup, IndexTupleSize(*newtup),
|
||||
return (PageAddItem(page, (Item) *newtup, IndexTupleSize(*newtup),
|
||||
offsetNumber, flags));
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ gistPageAddItem(GISTSTATE * giststate,
|
||||
static InsertIndexResult
|
||||
gistdoinsert(Relation r,
|
||||
IndexTuple itup, /* itup contains compressed entry */
|
||||
GISTSTATE * giststate)
|
||||
GISTSTATE *giststate)
|
||||
{
|
||||
GISTENTRY tmpdentry;
|
||||
InsertIndexResult res;
|
||||
@@ -468,8 +468,8 @@ static BlockNumber
|
||||
gistChooseSubtree(Relation r, IndexTuple itup, /* itup has compressed
|
||||
* entry */
|
||||
int level,
|
||||
GISTSTATE * giststate,
|
||||
GISTSTACK ** retstack /* out */ ,
|
||||
GISTSTATE *giststate,
|
||||
GISTSTACK **retstack /* out */ ,
|
||||
Buffer *leafbuf /* out */ )
|
||||
{
|
||||
Buffer buffer;
|
||||
@@ -520,11 +520,11 @@ gistChooseSubtree(Relation r, IndexTuple itup, /* itup has compressed
|
||||
|
||||
static void
|
||||
gistAdjustKeys(Relation r,
|
||||
GISTSTACK * stk,
|
||||
GISTSTACK *stk,
|
||||
BlockNumber blk,
|
||||
char *datum, /* datum is uncompressed */
|
||||
int att_size,
|
||||
GISTSTATE * giststate)
|
||||
GISTSTATE *giststate)
|
||||
{
|
||||
char *oldud;
|
||||
Page p;
|
||||
@@ -603,14 +603,14 @@ gistAdjustKeys(Relation r,
|
||||
|
||||
/* delete old tuple */
|
||||
ItemPointerSet(&oldtid, stk->gs_blk, stk->gs_child);
|
||||
gistdelete(r, (ItemPointer) & oldtid);
|
||||
gistdelete(r, (ItemPointer) &oldtid);
|
||||
|
||||
/* generate and insert new tuple */
|
||||
tupDesc = r->rd_att;
|
||||
isnull = (char *) palloc(r->rd_rel->relnatts);
|
||||
memset(isnull, ' ', r->rd_rel->relnatts);
|
||||
newtup = (IndexTuple) index_formtuple(tupDesc,
|
||||
(Datum *) & centry.pred, isnull);
|
||||
(Datum *) ¢ry.pred, isnull);
|
||||
pfree(isnull);
|
||||
/* set pointer in new tuple to point to current child */
|
||||
ItemPointerSet(&oldtid, blk, 1);
|
||||
@@ -644,9 +644,9 @@ gistAdjustKeys(Relation r,
|
||||
static InsertIndexResult
|
||||
gistSplit(Relation r,
|
||||
Buffer buffer,
|
||||
GISTSTACK * stack,
|
||||
GISTSTACK *stack,
|
||||
IndexTuple itup, /* contains compressed entry */
|
||||
GISTSTATE * giststate)
|
||||
GISTSTATE *giststate)
|
||||
{
|
||||
Page p;
|
||||
Buffer leftbuf,
|
||||
@@ -861,9 +861,9 @@ gistSplit(Relation r,
|
||||
tupDesc = r->rd_att;
|
||||
|
||||
ltup = (IndexTuple) index_formtuple(tupDesc,
|
||||
(Datum *) & (v.spl_ldatum), isnull);
|
||||
(Datum *) &(v.spl_ldatum), isnull);
|
||||
rtup = (IndexTuple) index_formtuple(tupDesc,
|
||||
(Datum *) & (v.spl_rdatum), isnull);
|
||||
(Datum *) &(v.spl_rdatum), isnull);
|
||||
pfree(isnull);
|
||||
|
||||
/* set pointers to new child pages in the internal index tuples */
|
||||
@@ -884,10 +884,10 @@ gistSplit(Relation r,
|
||||
*/
|
||||
static void
|
||||
gistintinsert(Relation r,
|
||||
GISTSTACK * stk,
|
||||
GISTSTACK *stk,
|
||||
IndexTuple ltup, /* new version of entry for old page */
|
||||
IndexTuple rtup, /* entry for new page */
|
||||
GISTSTATE * giststate)
|
||||
GISTSTATE *giststate)
|
||||
{
|
||||
ItemPointerData ltid;
|
||||
|
||||
@@ -899,7 +899,7 @@ gistintinsert(Relation r,
|
||||
|
||||
/* remove old left pointer, insert the 2 new entries */
|
||||
ItemPointerSet(<id, stk->gs_blk, stk->gs_child);
|
||||
gistdelete(r, (ItemPointer) & ltid);
|
||||
gistdelete(r, (ItemPointer) <id);
|
||||
gistentryinserttwo(r, stk, ltup, rtup, giststate);
|
||||
}
|
||||
|
||||
@@ -908,8 +908,8 @@ gistintinsert(Relation r,
|
||||
** Insert two entries onto one page, handling a split for either one!
|
||||
*/
|
||||
static void
|
||||
gistentryinserttwo(Relation r, GISTSTACK * stk, IndexTuple ltup,
|
||||
IndexTuple rtup, GISTSTATE * giststate)
|
||||
gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
|
||||
IndexTuple rtup, GISTSTATE *giststate)
|
||||
{
|
||||
Buffer b;
|
||||
Page p;
|
||||
@@ -950,8 +950,8 @@ gistentryinserttwo(Relation r, GISTSTACK * stk, IndexTuple ltup,
|
||||
** Insert an entry onto a page
|
||||
*/
|
||||
static InsertIndexResult
|
||||
gistentryinsert(Relation r, GISTSTACK * stk, IndexTuple tup,
|
||||
GISTSTATE * giststate)
|
||||
gistentryinsert(Relation r, GISTSTACK *stk, IndexTuple tup,
|
||||
GISTSTATE *giststate)
|
||||
{
|
||||
Buffer b;
|
||||
Page p;
|
||||
@@ -990,7 +990,7 @@ gistentryinsert(Relation r, GISTSTACK * stk, IndexTuple tup,
|
||||
|
||||
|
||||
static void
|
||||
gistnewroot(GISTSTATE * giststate, Relation r, IndexTuple lt, IndexTuple rt)
|
||||
gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt)
|
||||
{
|
||||
Buffer b;
|
||||
Page p;
|
||||
@@ -1042,7 +1042,7 @@ GISTInitBuffer(Buffer b, uint32 f)
|
||||
*/
|
||||
static OffsetNumber
|
||||
gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */
|
||||
GISTSTATE * giststate)
|
||||
GISTSTATE *giststate)
|
||||
{
|
||||
OffsetNumber maxoff;
|
||||
OffsetNumber i;
|
||||
@@ -1095,7 +1095,7 @@ gistnospace(Page p, IndexTuple it)
|
||||
}
|
||||
|
||||
void
|
||||
gistfreestack(GISTSTACK * s)
|
||||
gistfreestack(GISTSTACK *s)
|
||||
{
|
||||
GISTSTACK *p;
|
||||
|
||||
@@ -1140,7 +1140,7 @@ gistdelete(Relation r, ItemPointer tid)
|
||||
}
|
||||
|
||||
void
|
||||
initGISTstate(GISTSTATE * giststate, Relation index)
|
||||
initGISTstate(GISTSTATE *giststate, Relation index)
|
||||
{
|
||||
RegProcedure consistent_proc,
|
||||
union_proc,
|
||||
@@ -1237,7 +1237,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t)
|
||||
for (blank = 0; blank < r->rd_rel->relnatts; blank++)
|
||||
isnull[blank] = ' ';
|
||||
newtup = (IndexTuple) index_formtuple(tupDesc,
|
||||
(Datum *) & (entry.pred),
|
||||
(Datum *) &(entry.pred),
|
||||
isnull);
|
||||
newtup->t_tid = t->t_tid;
|
||||
pfree(isnull);
|
||||
@@ -1250,7 +1250,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t)
|
||||
** initialize a GiST entry with a decompressed version of pred
|
||||
*/
|
||||
void
|
||||
gistdentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, Relation r,
|
||||
gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
|
||||
Page pg, OffsetNumber o, int b, bool l)
|
||||
{
|
||||
GISTENTRY *dep;
|
||||
@@ -1271,7 +1271,7 @@ gistdentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, Relation r,
|
||||
** initialize a GiST entry with a compressed version of pred
|
||||
*/
|
||||
static void
|
||||
gistcentryinit(GISTSTATE * giststate, GISTENTRY * e, char *pr, Relation r,
|
||||
gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
|
||||
Page pg, OffsetNumber o, int b, bool l)
|
||||
{
|
||||
GISTENTRY *cep;
|
||||
@@ -1351,7 +1351,7 @@ _gistdump(Relation r)
|
||||
|
||||
#ifdef NOT_USED
|
||||
static char *
|
||||
text_range_out(TXTRANGE * r)
|
||||
text_range_out(TXTRANGE *r)
|
||||
{
|
||||
char *result;
|
||||
char *lower,
|
||||
@@ -1378,7 +1378,7 @@ text_range_out(TXTRANGE * r)
|
||||
#endif
|
||||
|
||||
static char *
|
||||
int_range_out(INTRANGE * r)
|
||||
int_range_out(INTRANGE *r)
|
||||
{
|
||||
char *result;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir);
|
||||
static ItemPointer gistheapptr(Relation r, ItemPointer itemp);
|
||||
static bool
|
||||
gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
|
||||
int scanKeySize, ScanKey key, GISTSTATE * giststate,
|
||||
int scanKeySize, ScanKey key, GISTSTATE *giststate,
|
||||
Relation r, Page p, OffsetNumber offset);
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ gistindex_keytest(IndexTuple tuple,
|
||||
TupleDesc tupdesc,
|
||||
int scanKeySize,
|
||||
ScanKey key,
|
||||
GISTSTATE * giststate,
|
||||
GISTSTATE *giststate,
|
||||
Relation r,
|
||||
Page p,
|
||||
OffsetNumber offset)
|
||||
|
||||
@@ -33,7 +33,7 @@ static void
|
||||
gistadjone(IndexScanDesc s, int op, BlockNumber blkno,
|
||||
OffsetNumber offnum);
|
||||
static void
|
||||
adjuststack(GISTSTACK * stk, BlockNumber blkno,
|
||||
adjuststack(GISTSTACK *stk, BlockNumber blkno,
|
||||
OffsetNumber offnum);
|
||||
static void
|
||||
adjustiptr(IndexScanDesc s, ItemPointer iptr,
|
||||
@@ -53,7 +53,7 @@ typedef struct GISTScanListData
|
||||
{
|
||||
IndexScanDesc gsl_scan;
|
||||
struct GISTScanListData *gsl_next;
|
||||
} GISTScanListData;
|
||||
} GISTScanListData;
|
||||
|
||||
typedef GISTScanListData *GISTScanList;
|
||||
|
||||
@@ -418,7 +418,7 @@ adjustiptr(IndexScanDesc s,
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
adjuststack(GISTSTACK * stk,
|
||||
adjuststack(GISTSTACK *stk,
|
||||
BlockNumber blkno,
|
||||
OffsetNumber offnum)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.15 1997/09/08 20:53:53 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.16 1997/09/08 21:40:45 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -48,9 +48,9 @@ hashbuild(Relation heap,
|
||||
AttrNumber *attnum,
|
||||
IndexStrategy istrat,
|
||||
uint16 pcount,
|
||||
Datum * params,
|
||||
FuncIndexInfo * finfo,
|
||||
PredInfo * predInfo)
|
||||
Datum *params,
|
||||
FuncIndexInfo *finfo,
|
||||
PredInfo *predInfo)
|
||||
{
|
||||
HeapScanDesc hscan;
|
||||
Buffer buffer;
|
||||
@@ -278,7 +278,7 @@ hashbuild(Relation heap,
|
||||
* to the caller.
|
||||
*/
|
||||
InsertIndexResult
|
||||
hashinsert(Relation rel, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
{
|
||||
HashItem hitem;
|
||||
IndexTuple itup;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.5 1997/09/08 02:20:13 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.6 1997/09/08 21:40:47 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These functions are stored in pg_amproc. For each operator class
|
||||
@@ -23,7 +23,7 @@
|
||||
uint32
|
||||
hashint2(int16 key)
|
||||
{
|
||||
return ((uint32) ~ key);
|
||||
return ((uint32) ~key);
|
||||
}
|
||||
|
||||
uint32
|
||||
@@ -130,7 +130,7 @@ hashfloat8(float64 keyp)
|
||||
uint32
|
||||
hashoid(Oid key)
|
||||
{
|
||||
return ((uint32) ~ key);
|
||||
return ((uint32) ~key);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ hashchar8(char *key)
|
||||
}
|
||||
|
||||
uint32
|
||||
hashname(NameData * n)
|
||||
hashname(NameData *n)
|
||||
{
|
||||
uint32 h;
|
||||
int len;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.10 1997/09/08 02:20:20 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.11 1997/09/08 21:40:48 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Because we can be doing an index scan on a relation while we
|
||||
@@ -38,7 +38,7 @@ typedef struct HashScanListData
|
||||
{
|
||||
IndexScanDesc hashsl_scan;
|
||||
struct HashScanListData *hashsl_next;
|
||||
} HashScanListData;
|
||||
} HashScanListData;
|
||||
|
||||
typedef HashScanListData *HashScanList;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.13 1997/09/08 20:54:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.14 1997/09/08 21:40:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
|
||||
|
||||
static void
|
||||
_hash_readnext(Relation rel,
|
||||
Buffer *bufp, Page * pagep, HashPageOpaque * opaquep)
|
||||
Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
|
||||
{
|
||||
BlockNumber blkno;
|
||||
|
||||
@@ -146,7 +146,7 @@ _hash_readnext(Relation rel,
|
||||
|
||||
static void
|
||||
_hash_readprev(Relation rel,
|
||||
Buffer *bufp, Page * pagep, HashPageOpaque * opaquep)
|
||||
Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
|
||||
{
|
||||
BlockNumber blkno;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.18 1997/09/08 20:54:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.19 1997/09/08 21:40:57 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -1188,7 +1188,7 @@ heap_insert(Relation relation, HeapTuple tup)
|
||||
*/
|
||||
SetRefreshWhenInvalidate(ImmediateInvalidation);
|
||||
RelationInvalidateHeapTuple(relation, tup);
|
||||
SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation);
|
||||
SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
|
||||
}
|
||||
|
||||
return (tup->t_oid);
|
||||
@@ -1287,7 +1287,7 @@ heap_delete(Relation relation, ItemPointer tid)
|
||||
*/
|
||||
SetRefreshWhenInvalidate(ImmediateInvalidation);
|
||||
RelationInvalidateHeapTuple(relation, tp);
|
||||
SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation);
|
||||
SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
|
||||
|
||||
WriteBuffer(b);
|
||||
if (IsSystemRelationName(RelationGetRelationName(relation)->data))
|
||||
@@ -1441,7 +1441,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
|
||||
*/
|
||||
SetRefreshWhenInvalidate(ImmediateInvalidation);
|
||||
RelationInvalidateHeapTuple(relation, tp);
|
||||
SetRefreshWhenInvalidate((bool) ! ImmediateInvalidation);
|
||||
SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
|
||||
|
||||
WriteBuffer(buffer);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.15 1997/09/08 02:20:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.16 1997/09/08 21:41:06 momjian Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* index_open - open an index relation by relationId
|
||||
@@ -162,7 +162,7 @@ index_close(Relation relation)
|
||||
*/
|
||||
InsertIndexResult
|
||||
index_insert(Relation relation,
|
||||
Datum * datum,
|
||||
Datum *datum,
|
||||
char *nulls,
|
||||
ItemPointer heap_t_ctid,
|
||||
Relation heapRel)
|
||||
@@ -371,8 +371,8 @@ GetIndexValue(HeapTuple tuple,
|
||||
TupleDesc hTupDesc,
|
||||
int attOff,
|
||||
AttrNumber attrNums[],
|
||||
FuncIndexInfo * fInfo,
|
||||
bool * attNull,
|
||||
FuncIndexInfo *fInfo,
|
||||
bool *attNull,
|
||||
Buffer buffer)
|
||||
{
|
||||
Datum returnVal;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.11 1997/09/08 02:20:41 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.12 1997/09/08 21:41:07 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -540,7 +540,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
|
||||
*/
|
||||
void
|
||||
IndexSupportInitialize(IndexStrategy indexStrategy,
|
||||
RegProcedure * indexSupport,
|
||||
RegProcedure *indexSupport,
|
||||
Oid indexObjectId,
|
||||
Oid accessMethodObjectId,
|
||||
StrategyNumber maxStrategyNumber,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.12 1997/09/08 02:20:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.13 1997/09/08 21:41:11 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These functions are stored in pg_amproc. For each operator class
|
||||
@@ -126,7 +126,7 @@ btchar16cmp(char *a, char *b)
|
||||
}
|
||||
|
||||
int32
|
||||
btnamecmp(NameData * a, NameData * b)
|
||||
btnamecmp(NameData *a, NameData *b)
|
||||
{
|
||||
return (strncmp(a->data, b->data, NAMEDATALEN));
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.19 1997/09/08 02:20:46 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.20 1997/09/08 21:41:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -435,7 +435,7 @@ _bt_insertonpg(Relation rel,
|
||||
maxoff = PageGetMaxOffsetNumber(page);
|
||||
llimit = PageGetPageSize(page) - sizeof(PageHeaderData) -
|
||||
DOUBLEALIGN(sizeof(BTPageOpaqueData))
|
||||
+ sizeof(ItemIdData);
|
||||
+sizeof(ItemIdData);
|
||||
llimit /= 2;
|
||||
firstright = _bt_findsplitloc(rel, page, start, maxoff, llimit);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.22 1997/09/08 20:54:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.23 1997/09/08 21:41:24 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -59,9 +59,9 @@ btbuild(Relation heap,
|
||||
AttrNumber *attnum,
|
||||
IndexStrategy istrat,
|
||||
uint16 pcount,
|
||||
Datum * params,
|
||||
FuncIndexInfo * finfo,
|
||||
PredInfo * predInfo)
|
||||
Datum *params,
|
||||
FuncIndexInfo *finfo,
|
||||
PredInfo *predInfo)
|
||||
{
|
||||
HeapScanDesc hscan;
|
||||
Buffer buffer;
|
||||
@@ -356,7 +356,7 @@ btbuild(Relation heap,
|
||||
* return an InsertIndexResult to the caller.
|
||||
*/
|
||||
InsertIndexResult
|
||||
btinsert(Relation rel, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
{
|
||||
BTItem btitem;
|
||||
IndexTuple itup;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: nbtsort.c,v 1.22 1997/09/08 20:54:28 momjian Exp $
|
||||
* $Id: nbtsort.c,v 1.23 1997/09/08 21:41:28 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -800,7 +800,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
|
||||
* allocate a new, clean btree page, not linked to any siblings.
|
||||
*/
|
||||
static void
|
||||
_bt_blnewpage(Relation index, Buffer *buf, Page * page, int flags)
|
||||
_bt_blnewpage(Relation index, Buffer *buf, Page *page, int flags)
|
||||
{
|
||||
BTPageOpaque opaque;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.13 1997/09/08 02:21:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.14 1997/09/08 21:41:31 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -347,7 +347,7 @@ _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz)
|
||||
#endif
|
||||
|
||||
bool
|
||||
_bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size * keysok)
|
||||
_bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
|
||||
{
|
||||
BTScanOpaque so = (BTScanOpaque) scan->opaque;
|
||||
Size keysz = so->numberOfKeys;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.10 1997/09/08 20:54:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.11 1997/09/08 21:41:37 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -87,7 +87,7 @@ rt_bigbox_size(BOX *a, float *size)
|
||||
}
|
||||
|
||||
POLYGON *
|
||||
rt_poly_union(POLYGON * a, POLYGON * b)
|
||||
rt_poly_union(POLYGON *a, POLYGON *b)
|
||||
{
|
||||
POLYGON *p;
|
||||
|
||||
@@ -107,7 +107,7 @@ rt_poly_union(POLYGON * a, POLYGON * b)
|
||||
}
|
||||
|
||||
void
|
||||
rt_poly_size(POLYGON * a, float *size)
|
||||
rt_poly_size(POLYGON *a, float *size)
|
||||
{
|
||||
double xdim,
|
||||
ydim;
|
||||
@@ -129,7 +129,7 @@ rt_poly_size(POLYGON * a, float *size)
|
||||
}
|
||||
|
||||
POLYGON *
|
||||
rt_poly_inter(POLYGON * a, POLYGON * b)
|
||||
rt_poly_inter(POLYGON *a, POLYGON *b)
|
||||
{
|
||||
POLYGON *p;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.16 1997/09/08 20:54:33 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.17 1997/09/08 21:41:39 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -40,38 +40,38 @@ typedef struct SPLITVEC
|
||||
OffsetNumber *spl_right;
|
||||
int spl_nright;
|
||||
char *spl_rdatum;
|
||||
} SPLITVEC;
|
||||
} SPLITVEC;
|
||||
|
||||
typedef struct RTSTATE
|
||||
{
|
||||
func_ptr unionFn; /* union function */
|
||||
func_ptr sizeFn; /* size function */
|
||||
func_ptr interFn; /* intersection function */
|
||||
} RTSTATE;
|
||||
} RTSTATE;
|
||||
|
||||
/* non-export function prototypes */
|
||||
static InsertIndexResult
|
||||
rtdoinsert(Relation r, IndexTuple itup,
|
||||
RTSTATE * rtstate);
|
||||
RTSTATE *rtstate);
|
||||
static void
|
||||
rttighten(Relation r, RTSTACK * stk, char *datum, int att_size,
|
||||
RTSTATE * rtstate);
|
||||
rttighten(Relation r, RTSTACK *stk, char *datum, int att_size,
|
||||
RTSTATE *rtstate);
|
||||
static InsertIndexResult
|
||||
dosplit(Relation r, Buffer buffer, RTSTACK * stack,
|
||||
IndexTuple itup, RTSTATE * rtstate);
|
||||
dosplit(Relation r, Buffer buffer, RTSTACK *stack,
|
||||
IndexTuple itup, RTSTATE *rtstate);
|
||||
static void
|
||||
rtintinsert(Relation r, RTSTACK * stk, IndexTuple ltup,
|
||||
IndexTuple rtup, RTSTATE * rtstate);
|
||||
rtintinsert(Relation r, RTSTACK *stk, IndexTuple ltup,
|
||||
IndexTuple rtup, RTSTATE *rtstate);
|
||||
static void rtnewroot(Relation r, IndexTuple lt, IndexTuple rt);
|
||||
static void
|
||||
picksplit(Relation r, Page page, SPLITVEC * v, IndexTuple itup,
|
||||
RTSTATE * rtstate);
|
||||
picksplit(Relation r, Page page, SPLITVEC *v, IndexTuple itup,
|
||||
RTSTATE *rtstate);
|
||||
static void RTInitBuffer(Buffer b, uint32 f);
|
||||
static OffsetNumber
|
||||
choose(Relation r, Page p, IndexTuple it,
|
||||
RTSTATE * rtstate);
|
||||
RTSTATE *rtstate);
|
||||
static int nospace(Page p, IndexTuple it);
|
||||
static void initRtstate(RTSTATE * rtstate, Relation index);
|
||||
static void initRtstate(RTSTATE *rtstate, Relation index);
|
||||
|
||||
|
||||
void
|
||||
@@ -81,9 +81,9 @@ rtbuild(Relation heap,
|
||||
AttrNumber *attnum,
|
||||
IndexStrategy istrat,
|
||||
uint16 pcount,
|
||||
Datum * params,
|
||||
FuncIndexInfo * finfo,
|
||||
PredInfo * predInfo)
|
||||
Datum *params,
|
||||
FuncIndexInfo *finfo,
|
||||
PredInfo *predInfo)
|
||||
{
|
||||
HeapScanDesc scan;
|
||||
Buffer buffer;
|
||||
@@ -305,7 +305,7 @@ rtbuild(Relation heap,
|
||||
* It doesn't do any work; just locks the relation and passes the buck.
|
||||
*/
|
||||
InsertIndexResult
|
||||
rtinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||
{
|
||||
InsertIndexResult res;
|
||||
IndexTuple itup;
|
||||
@@ -324,7 +324,7 @@ rtinsert(Relation r, Datum * datum, char *nulls, ItemPointer ht_ctid, Relation h
|
||||
}
|
||||
|
||||
static InsertIndexResult
|
||||
rtdoinsert(Relation r, IndexTuple itup, RTSTATE * rtstate)
|
||||
rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate)
|
||||
{
|
||||
Page page;
|
||||
Buffer buffer;
|
||||
@@ -409,10 +409,10 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE * rtstate)
|
||||
|
||||
static void
|
||||
rttighten(Relation r,
|
||||
RTSTACK * stk,
|
||||
RTSTACK *stk,
|
||||
char *datum,
|
||||
int att_size,
|
||||
RTSTATE * rtstate)
|
||||
RTSTATE *rtstate)
|
||||
{
|
||||
char *oldud;
|
||||
char *tdatum;
|
||||
@@ -483,9 +483,9 @@ rttighten(Relation r,
|
||||
static InsertIndexResult
|
||||
dosplit(Relation r,
|
||||
Buffer buffer,
|
||||
RTSTACK * stack,
|
||||
RTSTACK *stack,
|
||||
IndexTuple itup,
|
||||
RTSTATE * rtstate)
|
||||
RTSTATE *rtstate)
|
||||
{
|
||||
Page p;
|
||||
Buffer leftbuf,
|
||||
@@ -614,9 +614,9 @@ dosplit(Relation r,
|
||||
|
||||
tupDesc = r->rd_att;
|
||||
ltup = (IndexTuple) index_formtuple(tupDesc,
|
||||
(Datum *) & (v.spl_ldatum), isnull);
|
||||
(Datum *) &(v.spl_ldatum), isnull);
|
||||
rtup = (IndexTuple) index_formtuple(tupDesc,
|
||||
(Datum *) & (v.spl_rdatum), isnull);
|
||||
(Datum *) &(v.spl_rdatum), isnull);
|
||||
pfree(isnull);
|
||||
|
||||
/* set pointers to new child pages in the internal index tuples */
|
||||
@@ -633,10 +633,10 @@ dosplit(Relation r,
|
||||
|
||||
static void
|
||||
rtintinsert(Relation r,
|
||||
RTSTACK * stk,
|
||||
RTSTACK *stk,
|
||||
IndexTuple ltup,
|
||||
IndexTuple rtup,
|
||||
RTSTATE * rtstate)
|
||||
RTSTATE *rtstate)
|
||||
{
|
||||
IndexTuple old;
|
||||
Buffer b;
|
||||
@@ -714,9 +714,9 @@ rtnewroot(Relation r, IndexTuple lt, IndexTuple rt)
|
||||
static void
|
||||
picksplit(Relation r,
|
||||
Page page,
|
||||
SPLITVEC * v,
|
||||
SPLITVEC *v,
|
||||
IndexTuple itup,
|
||||
RTSTATE * rtstate)
|
||||
RTSTATE *rtstate)
|
||||
{
|
||||
OffsetNumber maxoff;
|
||||
OffsetNumber i,
|
||||
@@ -900,7 +900,7 @@ RTInitBuffer(Buffer b, uint32 f)
|
||||
}
|
||||
|
||||
static OffsetNumber
|
||||
choose(Relation r, Page p, IndexTuple it, RTSTATE * rtstate)
|
||||
choose(Relation r, Page p, IndexTuple it, RTSTATE *rtstate)
|
||||
{
|
||||
OffsetNumber maxoff;
|
||||
OffsetNumber i;
|
||||
@@ -944,7 +944,7 @@ nospace(Page p, IndexTuple it)
|
||||
}
|
||||
|
||||
void
|
||||
freestack(RTSTACK * s)
|
||||
freestack(RTSTACK *s)
|
||||
{
|
||||
RTSTACK *p;
|
||||
|
||||
@@ -986,7 +986,7 @@ rtdelete(Relation r, ItemPointer tid)
|
||||
}
|
||||
|
||||
static void
|
||||
initRtstate(RTSTATE * rtstate, Relation index)
|
||||
initRtstate(RTSTATE *rtstate, Relation index)
|
||||
{
|
||||
RegProcedure union_proc,
|
||||
size_proc,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.12 1997/09/08 02:21:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.13 1997/09/08 21:41:40 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ static void
|
||||
rtadjone(IndexScanDesc s, int op, BlockNumber blkno,
|
||||
OffsetNumber offnum);
|
||||
static void
|
||||
adjuststack(RTSTACK * stk, BlockNumber blkno,
|
||||
adjuststack(RTSTACK *stk, BlockNumber blkno,
|
||||
OffsetNumber offnum);
|
||||
static void
|
||||
adjustiptr(IndexScanDesc s, ItemPointer iptr,
|
||||
@@ -54,7 +54,7 @@ typedef struct RTScanListData
|
||||
{
|
||||
IndexScanDesc rtsl_scan;
|
||||
struct RTScanListData *rtsl_next;
|
||||
} RTScanListData;
|
||||
} RTScanListData;
|
||||
|
||||
typedef RTScanListData *RTScanList;
|
||||
|
||||
@@ -421,7 +421,7 @@ adjustiptr(IndexScanDesc s,
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
adjuststack(RTSTACK * stk,
|
||||
adjuststack(RTSTACK *stk,
|
||||
BlockNumber blkno,
|
||||
OffsetNumber offnum)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.12 1997/09/08 20:54:36 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.13 1997/09/08 21:41:42 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains the high level access-method interface to the
|
||||
@@ -134,7 +134,7 @@ SetRecoveryCheckingEnabled(bool state)
|
||||
* --------------------------------
|
||||
*/
|
||||
|
||||
static bool /* true/false: does transaction id have
|
||||
static bool /* true/false: does transaction id have
|
||||
* specified status? */
|
||||
TransactionLogTest(TransactionId transactionId, /* transaction id to test */
|
||||
XidStatus status) /* transaction status */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.12 1997/09/08 20:54:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.13 1997/09/08 21:41:46 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains support functions for the high
|
||||
@@ -111,7 +111,7 @@ TransComputeBlockNumber(Relation relation, /* relation to test */
|
||||
static XidStatus
|
||||
TransBlockGetLastTransactionIdStatus(Block tblock,
|
||||
TransactionId baseXid,
|
||||
TransactionId * returnXidP)
|
||||
TransactionId *returnXidP)
|
||||
{
|
||||
Index index;
|
||||
Index maxIndex;
|
||||
@@ -392,7 +392,7 @@ XidStatus
|
||||
TransBlockNumberGetXidStatus(Relation relation,
|
||||
BlockNumber blockNumber,
|
||||
TransactionId xid,
|
||||
bool * failP)
|
||||
bool *failP)
|
||||
{
|
||||
Buffer buffer; /* buffer associated with block */
|
||||
Block block; /* block containing xstatus */
|
||||
@@ -449,7 +449,7 @@ TransBlockNumberSetXidStatus(Relation relation,
|
||||
BlockNumber blockNumber,
|
||||
TransactionId xid,
|
||||
XidStatus xstatus,
|
||||
bool * failP)
|
||||
bool *failP)
|
||||
{
|
||||
Buffer buffer; /* buffer associated with block */
|
||||
Block block; /* block containing xstatus */
|
||||
@@ -502,7 +502,7 @@ AbsoluteTime
|
||||
TransBlockNumberGetCommitTime(Relation relation,
|
||||
BlockNumber blockNumber,
|
||||
TransactionId xid,
|
||||
bool * failP)
|
||||
bool *failP)
|
||||
{
|
||||
Buffer buffer; /* buffer associated with block */
|
||||
Block block; /* block containing commit time */
|
||||
@@ -563,7 +563,7 @@ TransBlockNumberSetCommitTime(Relation relation,
|
||||
BlockNumber blockNumber,
|
||||
TransactionId xid,
|
||||
AbsoluteTime xtime,
|
||||
bool * failP)
|
||||
bool *failP)
|
||||
{
|
||||
Buffer buffer; /* buffer associated with block */
|
||||
Block block; /* block containing commit time */
|
||||
@@ -618,7 +618,7 @@ void
|
||||
TransGetLastRecordedTransaction(Relation relation,
|
||||
TransactionId xid, /* return: transaction
|
||||
* id */
|
||||
bool * failP)
|
||||
bool *failP)
|
||||
{
|
||||
BlockNumber blockNumber; /* block number */
|
||||
Buffer buffer; /* buffer associated with block */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.11 1997/09/08 02:21:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.12 1997/09/08 21:41:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -20,12 +20,12 @@
|
||||
#include <access/heapam.h>
|
||||
#include <catalog/catname.h>
|
||||
|
||||
static void GetNewObjectIdBlock(Oid * oid_return, int oid_block_size);
|
||||
static void VariableRelationGetNextOid(Oid * oid_return);
|
||||
static void VariableRelationGetNextXid(TransactionId * xidP);
|
||||
static void GetNewObjectIdBlock(Oid *oid_return, int oid_block_size);
|
||||
static void VariableRelationGetNextOid(Oid *oid_return);
|
||||
static void VariableRelationGetNextXid(TransactionId *xidP);
|
||||
static void VariableRelationPutLastXid(TransactionId xid);
|
||||
static void VariableRelationPutNextOid(Oid * oidP);
|
||||
static void VariableRelationGetLastXid(TransactionId * xidP);
|
||||
static void VariableRelationPutNextOid(Oid *oidP);
|
||||
static void VariableRelationGetLastXid(TransactionId *xidP);
|
||||
|
||||
/* ---------------------
|
||||
* spin lock for oid generation
|
||||
@@ -43,7 +43,7 @@ int OidGenLockId;
|
||||
* --------------------------------
|
||||
*/
|
||||
static void
|
||||
VariableRelationGetNextXid(TransactionId * xidP)
|
||||
VariableRelationGetNextXid(TransactionId *xidP)
|
||||
{
|
||||
Buffer buf;
|
||||
VariableRelationContents var;
|
||||
@@ -85,7 +85,7 @@ VariableRelationGetNextXid(TransactionId * xidP)
|
||||
* --------------------------------
|
||||
*/
|
||||
static void
|
||||
VariableRelationGetLastXid(TransactionId * xidP)
|
||||
VariableRelationGetLastXid(TransactionId *xidP)
|
||||
{
|
||||
Buffer buf;
|
||||
VariableRelationContents var;
|
||||
@@ -217,7 +217,7 @@ VariableRelationPutLastXid(TransactionId xid)
|
||||
* --------------------------------
|
||||
*/
|
||||
static void
|
||||
VariableRelationGetNextOid(Oid * oid_return)
|
||||
VariableRelationGetNextOid(Oid *oid_return)
|
||||
{
|
||||
Buffer buf;
|
||||
VariableRelationContents var;
|
||||
@@ -287,7 +287,7 @@ VariableRelationGetNextOid(Oid * oid_return)
|
||||
* --------------------------------
|
||||
*/
|
||||
static void
|
||||
VariableRelationPutNextOid(Oid * oidP)
|
||||
VariableRelationPutNextOid(Oid *oidP)
|
||||
{
|
||||
Buffer buf;
|
||||
VariableRelationContents var;
|
||||
@@ -387,7 +387,7 @@ static int prefetched_xid_count = 0;
|
||||
static TransactionId next_prefetched_xid;
|
||||
|
||||
void
|
||||
GetNewTransactionId(TransactionId * xid)
|
||||
GetNewTransactionId(TransactionId *xid)
|
||||
{
|
||||
TransactionId nextid;
|
||||
|
||||
@@ -497,7 +497,7 @@ UpdateLastCommittedXid(TransactionId xid)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
GetNewObjectIdBlock(Oid * oid_return, /* place to return the new object
|
||||
GetNewObjectIdBlock(Oid *oid_return, /* place to return the new object
|
||||
* id */
|
||||
int oid_block_size) /* number of oids desired */
|
||||
{
|
||||
@@ -558,7 +558,7 @@ static int prefetched_oid_count = 0;
|
||||
static Oid next_prefetched_oid;
|
||||
|
||||
void
|
||||
GetNewObjectId(Oid * oid_return)/* place to return the new object id */
|
||||
GetNewObjectId(Oid *oid_return) /* place to return the new object id */
|
||||
{
|
||||
/* ----------------
|
||||
* if we run out of prefetched oids, then we get some
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.15 1997/09/08 02:21:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.16 1997/09/08 21:41:52 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction aborts can now occur two ways:
|
||||
@@ -202,9 +202,9 @@ TransactionState CurrentTransactionState =
|
||||
* V1 transaction system. -cim 3/18/90
|
||||
* ----------------
|
||||
*/
|
||||
TransactionId DisabledTransactionId = (TransactionId) - 1;
|
||||
TransactionId DisabledTransactionId = (TransactionId) -1;
|
||||
|
||||
CommandId DisabledCommandId = (CommandId) - 1;
|
||||
CommandId DisabledCommandId = (CommandId) -1;
|
||||
|
||||
AbsoluteTime DisabledStartTime = (AbsoluteTime) BIG_ABSTIME; /* 1073741823; */
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.9 1997/09/08 02:21:24 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.10 1997/09/08 21:41:56 momjian Exp $
|
||||
*
|
||||
* OLD COMMENTS
|
||||
* XXX WARNING
|
||||
@@ -73,7 +73,7 @@ xidout(TransactionId transactionId)
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
StoreInvalidTransactionId(TransactionId * destination)
|
||||
StoreInvalidTransactionId(TransactionId *destination)
|
||||
{
|
||||
*destination = NullTransactionId;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ StoreInvalidTransactionId(TransactionId * destination)
|
||||
*/
|
||||
void
|
||||
TransactionIdStore(TransactionId transactionId,
|
||||
TransactionId * destination)
|
||||
TransactionId *destination)
|
||||
{
|
||||
*destination = transactionId;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ xideq(TransactionId xid1, TransactionId xid2)
|
||||
*/
|
||||
#ifdef NOT_USED
|
||||
void
|
||||
TransactionIdIncrement(TransactionId * transactionId)
|
||||
TransactionIdIncrement(TransactionId *transactionId)
|
||||
{
|
||||
|
||||
(*transactionId)++;
|
||||
@@ -150,7 +150,7 @@ TransactionIdIncrement(TransactionId * transactionId)
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
TransactionIdAdd(TransactionId * xid, int value)
|
||||
TransactionIdAdd(TransactionId *xid, int value)
|
||||
{
|
||||
*xid += value;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user