head	1.7;
access;
symbols
	Version_2_1:1.2
	Version_2:1.1;
locks
	glass:1.7; strict;
comment	@ * @;


1.7
date	91.11.08.15.43.47;	author kemnitz;	state Exp;
branches;
next	1.6;

1.6
date	91.06.10.20.55.48;	author kemnitz;	state Exp;
branches;
next	1.5;

1.5
date	91.06.03.15.34.01;	author kemnitz;	state Exp;
branches;
next	1.4;

1.4
date	91.06.03.03.01.24;	author kemnitz;	state Exp;
branches;
next	1.3;

1.3
date	91.05.01.02.50.13;	author cimarron;	state Exp;
branches;
next	1.2;

1.2
date	90.08.17.08.51.35;	author cimarron;	state Exp;
branches;
next	1.1;

1.1
date	90.06.12.21.26.55;	author cimarron;	state Version_2;
branches;
next	;


desc
@file moved from H to H/extern for reorginization
@


1.7
log
@fixed prototypes.
@
text
@/* ----------------------------------------------------------------
 *   FILE
 *	valid.h
 *
 *	XXX this file is becoming obsolete!  use the heap_ routines
 *	instead -cim 4/30/91
 *
 *   DESCRIPTION
 *	POSTGRES tuple qualification validity definitions.
 *
 *   IDENTIFICATION
 *	$Header: RCS/valid.h,v 1.6 91/06/10 20:55:48 kemnitz Exp Locker: kemnitz $
 * ----------------------------------------------------------------
 */

#ifndef	ValidIncluded		/* Include this file only once */
#define ValidIncluded	1

#define VALID_H	"$Header: RCS/valid.h,v 1.6 91/06/10 20:55:48 kemnitz Exp Locker: kemnitz $"

#include "tmp/c.h"
#include "access/skey.h"
#include "storage/buf.h"
#include "access/tqual.h"
#include "access/tupdesc.h"
#include "utils/rel.h"
#include "storage/bufpage.h"

/* ----------------
 *	extern decl's
 * ----------------
 */

/* 
 *  heap_keytest
 *    -- Test a heap tuple with respect to a scan key.
 */
extern
bool
heap_keytest ARGS((
    HeapTuple		t,
    TupleDescriptor 	tupdesc,
    int			nkeys,
    struct skey 	keys[]
));		   

/* 
 *  heap_tuple_satisfies
 *    -- returns a tuple satisfying the timequal and scankey.
 */

extern
HeapTuple
heap_tuple_satisfies ARGS((
    ItemId	itemId,
	Relation relation,
    PageHeader  disk_page,
    TimeQual	qual,
    ScanKeySize	nKeys,
    ScanKey key
));

/*
 *  TupleUpdatedByCurXactAndCmd() -- Returns true if this tuple has
 *	already been updated once by the current transaction/command
 *	pair.
 */
extern
bool
TupleUpdatedByCurXactAndCmd ARGS((
	HeapTuple	tuple
));

/* 
 * keytest_tupdesc
 * keytest
 */
#define keytest_tupdesc(t, tupdesc, nkeys, keys) \
    ((int) heap_keytest(t, tupdesc, nkeys, keys))

#define keytest(t, rdesc, nkeys, keys) \
    ((int) heap_keytest(t, &(rdesc)->rd_att, nkeys, keys))

#endif	/* !defined(ValidIncluded) */
@


1.6
log
@fixed include file declaration
@
text
@d12 1
a12 1
 *	$Header: RCS/valid.h,v 1.5 91/06/03 15:34:01 kemnitz Exp Locker: kemnitz $
d19 1
a19 1
#define VALID_H	"$Header: RCS/valid.h,v 1.5 91/06/03 15:34:01 kemnitz Exp Locker: kemnitz $"
d25 3
d60 1
a60 1
    struct skey	*key
@


1.5
log
@heap_satisfies now is heap_tuple_satisfies (which returns a tuple)
@
text
@d12 1
a12 1
 *	$Header: RCS/valid.h,v 1.4 91/06/03 03:01:24 kemnitz Exp Locker: kemnitz $
d19 1
a19 1
#define VALID_H	"$Header: RCS/valid.h,v 1.4 91/06/03 03:01:24 kemnitz Exp Locker: kemnitz $"
d54 1
a54 1
    Buffer	buffer,
@


1.4
log
@heap_satisifies --> heap_satisfies 
and added relation to interface.
@
text
@d12 1
a12 1
 *	$Header: RCS/valid.h,v 1.3 91/05/01 02:50:13 cimarron Exp Locker: kemnitz $
d19 1
a19 1
#define VALID_H	"$Header: RCS/valid.h,v 1.3 91/05/01 02:50:13 cimarron Exp Locker: kemnitz $"
d45 2
a46 2
 *  heap_satisfies
 *    -- test if item on page satisifies scan key
d48 1
d50 2
a51 2
bool
heap_satisfies ARGS((
@


1.3
log
@round II of converting simple functions to macros + code cleaning in general
@
text
@d12 1
a12 1
 *	$Header$
d19 1
a19 1
#define VALID_H	"$Header: RCS/valid.h,v 1.2 90/08/17 08:51:35 cimarron Exp Locker: cimarron $"
d45 1
a45 1
 *  heap_satisifies
d50 1
a50 1
heap_satisifies ARGS((
d52 1
a68 21

/* ----------------
 *	old interface macros
 * ----------------
 */
/*
 * ItemIdHasValidHeapTupleForQualification --
 *	True iff a heap tuple associated with an item identifier satisfies
 *	both a time range and a scan key qualification.
 *
 * Note:
 *	Assumes item identifier is valid.
 *	Assumes buffer is locked appropriately.
 *	Assumes time range is valid.
 *	Assumes scan qualification (key) is valid.
 */
#define ItemIdHasValidHeapTupleForQualification(itemId, buffer, qual, nKeys, key) \
    heap_satisifies(itemId, buffer, qual, nKeys, key)

#define amvalidtup(b, lp, nkeys, key) \
    ((int) heap_satisifies(lp, b, NowTimeQual, nkeys, key))
@


1.2
log
@added pathnames to #include statements
@
text
@d1 8
a8 2
/*
 * valid.h --
d10 4
d19 1
a19 4
/*
 * Identification:
 */
#define VALID_H	"$Header: RCS/valid.h,v 1.1 90/06/12 21:26:55 cimarron Version_2 Locker: cimarron $"
d26 3
a28 10
/*
 * ItemIdHasValidHeapTupleForQualification --
 *	True iff a heap tuple associated with an item identifier satisfies
 *	both a time range and a scan key qualification.
 *
 * Note:
 *	Assumes item identifier is valid.
 *	Assumes buffer is locked appropriately.
 *	Assumes time range is valid.
 *	Assumes scan qualification (key) is valid.
d30 5
d37 19
a55 6
ItemIdHasValidHeapTupleForQualification ARGS((
	ItemId		itemId,
	Buffer		buffer,
	TimeQual	qual,
	ScanKeySize	numberOfKeys,
	ScanKey		key
a62 1

d68 31
@


1.1
log
@Initial revision
@
text
@d12 1
a12 1
#define VALID_H	"$Header: RCS/valid.h,v 1.6 90/05/03 17:09:04 mao Exp $"
d14 4
a17 12
#ifndef C_H
#include "c.h"
#endif

#include "skey.h"

#ifndef	BUF_H
# include "buf.h"
#endif
#ifndef	TQUAL_H
# include "tqual.h"
#endif
@
