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

  1. /*
  2.  * newam.h --
  3.  *    POSTGRES definitions which interface with new access methods.
  4.  *
  5.  * Identification:
  6.  *    $Header: /private/postgres/src/lib/H/access/RCS/newam.h,v 1.13 1992/02/19 21:05:06 mer Exp $
  7.  */
  8.  
  9. #ifndef    NewAMIncluded
  10. #define NewAMIncluded    1
  11.  
  12. #include "tmp/postgres.h"
  13.  
  14. #include "access/istrat.h"
  15. #include "access/itup.h"
  16. #include "access/relscan.h"
  17. #include "access/sdir.h"
  18. #include "access/skey.h"
  19. #include "utils/rel.h"
  20. #include "rules/rlock.h"
  21. #include "access/funcindex.h"
  22. #include "nodes/pg_lisp.h"
  23.  
  24. /*
  25.  * NewCreate --
  26.  *    Interface for new access method create file routine.
  27.  */
  28. extern
  29. void
  30. NewCreate ARGS((
  31.     Relation    relation,
  32.     char        relationName[16],
  33.     char        databaseName[16],
  34.     char        databasePath[]
  35. ));
  36.  
  37. /*
  38.  * NewBuild --
  39.  *    Interface for new access method build index routine.
  40.  */
  41. extern
  42. void
  43. NewBuild ARGS((
  44.     Relation    heapRelation,
  45.     Relation    indexRelation,
  46.     AttributeNumber    numberOfAttributes,
  47.     AttributeNumber    attributeNumber[],
  48.     uint16        parameterCount,
  49.     Datum        parameter[]
  50. ));
  51.  
  52. /*
  53.  * DefaultBuild --
  54.  *    Default build index routine.
  55.  */
  56. extern
  57. void
  58. DefaultBuild ARGS((
  59.     Relation    heapRelation,
  60.     Relation    indexRelation,
  61.     AttributeNumber    numberOfAttributes,
  62.     AttributeNumber    attributeNumber[],
  63.     IndexStrategy    indexStrategy,
  64.     uint16        parameterCount,
  65.     Datum        parameter[],
  66.     FuncIndexInfoPtr    funcInfo,
  67.     LispValue    predicate
  68. ));
  69.  
  70. /*
  71.  * FormIndexDatum --
  72.  *    extracts attribute information from a heap tuple,
  73.  *    from which an index tuple is created.
  74.  */
  75. extern
  76. void
  77. FormIndexDatum ARGS((
  78.     AttributeNumber    numberOfAttributes,
  79.     AttributeNumber    attributeNumber[],
  80.     HeapTuple        heapTuple,
  81.     TupleDescriptor    heapDescriptor,
  82.     Buffer        buffer,
  83.     Datum        *datum,
  84.     char        *nulls,
  85.     FuncIndexInfoPtr    fInfo
  86. ));
  87.  
  88. /*
  89.  * NewDestroy --
  90.  *    Interface for new access method remove file routine.
  91.  */
  92. extern
  93. void
  94. NewDestroy ARGS((
  95.     Relation    relation,
  96.     char        relationName[16],
  97.     char        databaseName[16],
  98.     char        databasePath[]
  99. ));
  100.  
  101. /*
  102.  * NewOpen --
  103.  *    Interface for new access method open file routine.
  104.  */
  105. extern
  106. int        /* for now */
  107. NewOpen ARGS((
  108.     Relation    relation,
  109.     char        relationName[16],
  110.     char        databaseName[16],
  111.     char        databasePath[]
  112. ));
  113.  
  114. /*
  115.  * NewClose --
  116.  *    Interface for new access method close file routine.
  117.  */
  118. extern
  119. void
  120. NewClose ARGS((
  121.     Relation    relation,
  122.     int        f        /* for now */
  123. ));
  124.  
  125. /*
  126.  * NewInsert --
  127.  *    Interface for new access method index tuple insertion routine.
  128.  */
  129. extern
  130. InsertIndexResult
  131. NewInsert ARGS((
  132.     Relation    relation,
  133.     IndexTuple    indexTuple,
  134.     bool        computeOffset,
  135.     char        *scan        /* XXX fix this */
  136. ));
  137.  
  138. /*
  139.  * NewDelete --
  140.  *    Interface for new access method index tuple deletion routine.
  141.  */
  142. extern
  143. void
  144. NewDelete ARGS((
  145.     Relation    relation,
  146.     ItemPointer    tid
  147. ));
  148.  
  149. /*
  150.  * NewSetLock --
  151.  *    Interface for new access method lock setting routine.
  152.  */
  153. extern
  154. void
  155. NewSetLock ARGS((
  156.     Relation    relation,
  157.     ItemPointer    indexItemPointer,
  158.     RuleLock    lock
  159. ));
  160.  
  161. /*
  162.  * NewSetTid --
  163.  *    Interface for new access method base "tid" setting routine.
  164.  */
  165. extern
  166. void
  167. NewSetTid ARGS((
  168.     Relation    relation,
  169.     ItemPointer    indexItemPointer,
  170.     ItemPointer    heapItemPointer
  171. ));
  172.  
  173. /*
  174.  * NewBeginScan --
  175.  *    Interface for new access method initialize index scan routine.
  176.  */
  177. extern
  178. IndexScanDesc
  179. NewBeginScan ARGS((
  180.     Relation    relation,
  181.     bool        startScanAtEnd,
  182.     uint16        numberOfKeys,
  183.     ScanKey        key
  184. ));
  185.  
  186. /*
  187.  * NewRescan --
  188.  *    Interface for new access method restart index scan routine.
  189.  */
  190. extern
  191. void
  192. NewRescan ARGS((
  193.     IndexScanDesc    scan,
  194.     ScanKey        key
  195. ));
  196.  
  197. /*
  198.  * NewEndScan --
  199.  *    Interface for new access method end index scan routine.
  200.  */
  201. extern
  202. void
  203. NewEndScan ARGS((
  204.     IndexScanDesc    scan
  205. ));
  206.  
  207. /*
  208.  * NewMarkPos --
  209.  *    Interface for new access method mark index scan position routine.
  210.  */
  211. extern
  212. void
  213. NewMarkPos ARGS((
  214.     IndexScanDesc    scan
  215. ));
  216.  
  217. /*
  218.  * NewRestrPos --
  219.  *    Interface for new access method restore index scan position routine.
  220.  */
  221. extern
  222. void
  223. NewRestrPos ARGS((
  224.     IndexScanDesc    scan
  225. ));
  226.  
  227. /*
  228.  * NewGetTuple --
  229.  *    Interface for new access method get index tuple routine.
  230.  */
  231. extern
  232. RetrieveIndexResult
  233. NewGetTuple ARGS((
  234.     Relation    relation,
  235.     ItemPointer    indexItem,
  236.     int        direction,    /* -1 backwd, 1 fwd, 0 no move XXX */
  237.     uint16        numberOfKeys,
  238.     ScanKey        key
  239. ));
  240.  
  241. /*
  242.  * NewFreeTuple --
  243.  *    Interface for new access method free tuple routine.
  244.  */
  245. extern
  246. NewFreeTuple ARGS((
  247.     Relation    relation
  248.     /* this needs more thought */
  249. ));
  250.  
  251. #endif    /* !defined(NewAMIncluded) */
  252.