From 293913568e6a7a86fd1479e1cff8e2ecb58d6568 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 15:44:03 +0200 Subject: Adding upstream version 16.2. Signed-off-by: Daniel Baumann --- src/include/catalog/indexing.h | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/include/catalog/indexing.h (limited to 'src/include/catalog/indexing.h') diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h new file mode 100644 index 0000000..5c06938 --- /dev/null +++ b/src/include/catalog/indexing.h @@ -0,0 +1,54 @@ +/*------------------------------------------------------------------------- + * + * indexing.h + * This file provides some definitions to support indexing + * on system catalogs + * + * + * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/catalog/indexing.h + * + *------------------------------------------------------------------------- + */ +#ifndef INDEXING_H +#define INDEXING_H + +#include "access/htup.h" +#include "nodes/execnodes.h" +#include "utils/relcache.h" + +/* + * The state object used by CatalogOpenIndexes and friends is actually the + * same as the executor's ResultRelInfo, but we give it another type name + * to decouple callers from that fact. + */ +typedef struct ResultRelInfo *CatalogIndexState; + +/* + * Cap the maximum amount of bytes allocated for multi-inserts with system + * catalogs, limiting the number of slots used. + */ +#define MAX_CATALOG_MULTI_INSERT_BYTES 65535 + +/* + * indexing.c prototypes + */ +extern CatalogIndexState CatalogOpenIndexes(Relation heapRel); +extern void CatalogCloseIndexes(CatalogIndexState indstate); +extern void CatalogTupleInsert(Relation heapRel, HeapTuple tup); +extern void CatalogTupleInsertWithInfo(Relation heapRel, HeapTuple tup, + CatalogIndexState indstate); +extern void CatalogTuplesMultiInsertWithInfo(Relation heapRel, + TupleTableSlot **slot, + int ntuples, + CatalogIndexState indstate); +extern void CatalogTupleUpdate(Relation heapRel, ItemPointer otid, + HeapTuple tup); +extern void CatalogTupleUpdateWithInfo(Relation heapRel, + ItemPointer otid, HeapTuple tup, + CatalogIndexState indstate); +extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid); + +#endif /* INDEXING_H */ -- cgit v1.2.3