PostgreSQL Source Code  git master
indexing.h
Go to the documentation of this file.
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-2024, 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 
18 #include "access/htup.h"
19 #include "nodes/execnodes.h"
20 #include "utils/relcache.h"
21 
22 /*
23  * The state object used by CatalogOpenIndexes and friends is actually the
24  * same as the executor's ResultRelInfo, but we give it another type name
25  * to decouple callers from that fact.
26  */
28 
29 /*
30  * Cap the maximum amount of bytes allocated for multi-inserts with system
31  * catalogs, limiting the number of slots used.
32  */
33 #define MAX_CATALOG_MULTI_INSERT_BYTES 65535
34 
35 /*
36  * indexing.c prototypes
37  */
39 extern void CatalogCloseIndexes(CatalogIndexState indstate);
40 extern void CatalogTupleInsert(Relation heapRel, HeapTuple tup);
41 extern void CatalogTupleInsertWithInfo(Relation heapRel, HeapTuple tup,
42  CatalogIndexState indstate);
43 extern void CatalogTuplesMultiInsertWithInfo(Relation heapRel,
44  TupleTableSlot **slot,
45  int ntuples,
46  CatalogIndexState indstate);
47 extern void CatalogTupleUpdate(Relation heapRel, ItemPointer otid,
48  HeapTuple tup);
49 extern void CatalogTupleUpdateWithInfo(Relation heapRel,
50  ItemPointer otid, HeapTuple tup,
51  CatalogIndexState indstate);
52 extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid);
53 
54 #endif /* INDEXING_H */
void CatalogTupleUpdate(Relation heapRel, ItemPointer otid, HeapTuple tup)
Definition: indexing.c:313
struct ResultRelInfo * CatalogIndexState
Definition: indexing.h:27
void CatalogTuplesMultiInsertWithInfo(Relation heapRel, TupleTableSlot **slot, int ntuples, CatalogIndexState indstate)
Definition: indexing.c:273
void CatalogTupleInsertWithInfo(Relation heapRel, HeapTuple tup, CatalogIndexState indstate)
Definition: indexing.c:256
void CatalogCloseIndexes(CatalogIndexState indstate)
Definition: indexing.c:61
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
Definition: indexing.c:233
CatalogIndexState CatalogOpenIndexes(Relation heapRel)
Definition: indexing.c:43
void CatalogTupleDelete(Relation heapRel, ItemPointer tid)
Definition: indexing.c:365
void CatalogTupleUpdateWithInfo(Relation heapRel, ItemPointer otid, HeapTuple tup, CatalogIndexState indstate)
Definition: indexing.c:337