home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / lib / H / access / valid.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  1.8 KB  |  85 lines

  1. /* ----------------------------------------------------------------
  2.  *   FILE
  3.  *    valid.h
  4.  *
  5.  *    XXX this file is becoming obsolete!  use the heap_ routines
  6.  *    instead -cim 4/30/91
  7.  *
  8.  *   DESCRIPTION
  9.  *    POSTGRES tuple qualification validity definitions.
  10.  *
  11.  *   IDENTIFICATION
  12.  *    $Header: /private/postgres/src/lib/H/access/RCS/valid.h,v 1.7 1991/11/08 15:43:47 kemnitz Exp $
  13.  * ----------------------------------------------------------------
  14.  */
  15.  
  16. #ifndef    ValidIncluded        /* Include this file only once */
  17. #define ValidIncluded    1
  18.  
  19. #define VALID_H    "$Header: /private/postgres/src/lib/H/access/RCS/valid.h,v 1.7 1991/11/08 15:43:47 kemnitz Exp $"
  20.  
  21. #include "tmp/c.h"
  22. #include "access/skey.h"
  23. #include "storage/buf.h"
  24. #include "access/tqual.h"
  25. #include "access/tupdesc.h"
  26. #include "utils/rel.h"
  27. #include "storage/bufpage.h"
  28.  
  29. /* ----------------
  30.  *    extern decl's
  31.  * ----------------
  32.  */
  33.  
  34. /* 
  35.  *  heap_keytest
  36.  *    -- Test a heap tuple with respect to a scan key.
  37.  */
  38. extern
  39. bool
  40. heap_keytest ARGS((
  41.     HeapTuple        t,
  42.     TupleDescriptor     tupdesc,
  43.     int            nkeys,
  44.     struct skey     keys[]
  45. ));           
  46.  
  47. /* 
  48.  *  heap_tuple_satisfies
  49.  *    -- returns a tuple satisfying the timequal and scankey.
  50.  */
  51.  
  52. extern
  53. HeapTuple
  54. heap_tuple_satisfies ARGS((
  55.     ItemId    itemId,
  56.     Relation relation,
  57.     PageHeader  disk_page,
  58.     TimeQual    qual,
  59.     ScanKeySize    nKeys,
  60.     ScanKey key
  61. ));
  62.  
  63. /*
  64.  *  TupleUpdatedByCurXactAndCmd() -- Returns true if this tuple has
  65.  *    already been updated once by the current transaction/command
  66.  *    pair.
  67.  */
  68. extern
  69. bool
  70. TupleUpdatedByCurXactAndCmd ARGS((
  71.     HeapTuple    tuple
  72. ));
  73.  
  74. /* 
  75.  * keytest_tupdesc
  76.  * keytest
  77.  */
  78. #define keytest_tupdesc(t, tupdesc, nkeys, keys) \
  79.     ((int) heap_keytest(t, tupdesc, nkeys, keys))
  80.  
  81. #define keytest(t, rdesc, nkeys, keys) \
  82.     ((int) heap_keytest(t, &(rdesc)->rd_att, nkeys, keys))
  83.  
  84. #endif    /* !defined(ValidIncluded) */
  85.