2
0

indexing.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*-------------------------------------------------------------------------
  2. *
  3. * indexing.h
  4. * This file provides some definitions to support indexing
  5. * on system catalogs
  6. *
  7. *
  8. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  9. * Portions Copyright (c) 1994, Regents of the University of California
  10. *
  11. * src/include/catalog/indexing.h
  12. *
  13. *-------------------------------------------------------------------------
  14. */
  15. #ifndef INDEXING_H
  16. #define INDEXING_H
  17. #include "access/htup.h"
  18. #include "nodes/execnodes.h"
  19. #include "utils/relcache.h"
  20. /*
  21. * The state object used by CatalogOpenIndexes and friends is actually the
  22. * same as the executor's ResultRelInfo, but we give it another type name
  23. * to decouple callers from that fact.
  24. */
  25. typedef struct ResultRelInfo *CatalogIndexState;
  26. /*
  27. * Cap the maximum amount of bytes allocated for multi-inserts with system
  28. * catalogs, limiting the number of slots used.
  29. */
  30. #define MAX_CATALOG_MULTI_INSERT_BYTES 65535
  31. /*
  32. * indexing.c prototypes
  33. */
  34. extern CatalogIndexState CatalogOpenIndexes(Relation heapRel);
  35. extern void CatalogCloseIndexes(CatalogIndexState indstate);
  36. extern void CatalogTupleInsert(Relation heapRel, HeapTuple tup);
  37. extern void CatalogTupleInsertWithInfo(Relation heapRel, HeapTuple tup,
  38. CatalogIndexState indstate);
  39. extern void CatalogTuplesMultiInsertWithInfo(Relation heapRel,
  40. TupleTableSlot **slot,
  41. int ntuples,
  42. CatalogIndexState indstate);
  43. extern void CatalogTupleUpdate(Relation heapRel, ItemPointer otid,
  44. HeapTuple tup);
  45. extern void CatalogTupleUpdateWithInfo(Relation heapRel,
  46. ItemPointer otid, HeapTuple tup,
  47. CatalogIndexState indstate);
  48. extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid);
  49. #endif /* INDEXING_H */