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

  1. /*
  2.  * relcache.h --
  3.  *    Relation descriptor cache definitions.
  4.  *
  5.  * Identification:
  6.  *    $Header: /private/postgres/src/lib/H/utils/RCS/relcache.h,v 1.12 1991/11/18 22:23:53 mer Exp $
  7.  */
  8.  
  9. #ifndef    RelCacheIncluded    /* Include this file only once. */
  10. #define RelCacheIncluded    1
  11.  
  12. #include <sys/types.h>
  13.  
  14. #include "tmp/postgres.h"
  15. #include "utils/rel.h"
  16.  
  17. /*
  18.  * relation lookup routines
  19.  */
  20. extern Relation
  21. RelationNameGetRelation ARGS((
  22.     Name        relationName
  23. ));
  24. extern Relation
  25. getreldesc ARGS((
  26.     Name        relationName
  27. ));
  28.  
  29. extern Relation
  30. RelationIdCacheGetRelation ARGS((
  31.     ObjectId    relationId
  32. ));
  33.  
  34. extern
  35. Relation RelationNameCacheGetRelation ARGS((Name relationName ));
  36.  
  37. extern Relation
  38. RelationIdGetRelation ARGS((
  39.     ObjectId    relationId
  40. ));
  41.  
  42. #ifdef EXTERN_UNDEFINED_FUNCTIONS
  43. /*
  44.  * RelationAllocate --
  45.  *    Allocates a relation descriptor.
  46.  */
  47. extern
  48. Relation
  49. RelationAllocate ARGS((
  50.     void    /* XXX ??? */
  51. ));
  52. #endif
  53.  
  54. /*
  55.  * XXXX
  56.  *
  57.  * The following two functions should be private to relcache.c but
  58.  * arn't.
  59.  *
  60.  */
  61.  
  62. extern File
  63. relopen ARGS((
  64.     char    *relationName,
  65.     int    flags,
  66.     int    mode
  67. ));
  68.  
  69. extern void
  70. RelationRegisterRelation ARGS((
  71.     Relation    relation
  72. ));
  73.  
  74. extern void
  75. RelationRegisterTempRel ARGS((
  76.     Relation temprel
  77. ));
  78.  
  79. /*
  80.  * RelationFlushRelation
  81.  *
  82.  *   Actually blows away a relation... RelationFree doesn't do 
  83.  *   anything anymore.
  84.  */
  85.  
  86. extern void
  87. RelationFlushRelation ARGS((
  88.     Relation        relation,
  89.     bool            onlyFlushReferenceCountZero
  90. ));
  91.  
  92. /*
  93.  * RelationIdInvalidateRelationCacheByRelationId --
  94.  */
  95. extern
  96. void
  97. RelationIdInvalidateRelationCacheByRelationId ARGS((
  98.     ObjectId    relationId
  99. ));
  100.  
  101. /*
  102.  * RelationIdInvalidateRelationCacheByAccessMethodId --
  103.  */
  104. extern
  105. void
  106. RelationIdInvalidateRelationCacheByAccessMethodId ARGS((
  107.     ObjectId    accessMethodId
  108. ));
  109.  
  110. /*
  111.  * InvalidateRelationCacheIndexes --
  112.  */
  113. extern
  114. void
  115. InvalidateRelationCacheIndexes ARGS((
  116.     void
  117. ));
  118.  
  119. /*
  120.  * RelationCacheInvalidate
  121.  *
  122.  *   Will blow away either all the cached relation descriptors or
  123.  *   those that have a zero reference count.
  124.  *
  125.  */
  126.  
  127. extern void
  128. RelationCacheInvalidate ARGS((
  129.     bool            onlyFlushReferenceCountZero
  130. ));
  131.  
  132. Relation AllocateRelationDesc ARGS((u_int natts , RelationTupleForm relp ));
  133. int IndexedAccessMethodInitialize ARGS((Relation relation ));
  134. void RelationClose ARGS((Relation relation ));
  135.  
  136. void RelationIdInvalidateRelationCacheByAccessMethodId ARGS((
  137.     ObjectId accessMethodId
  138. ));
  139. void RelationInitialize ARGS((void ));
  140.  
  141. #endif    /* !defined(RelCacheIncluded) */
  142.