public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alvaro Herrera <[email protected]>
Subject: [PATCH 1/1] document RelationGetIndexAttrBitmap
Date: Wed, 12 Jul 2023 14:19:23 +0200
---
src/backend/utils/cache/relcache.c | 12 +++++++++---
src/include/utils/relcache.h | 4 ++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 8a08463c2b7..2f3b580cb0d 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -5149,9 +5149,15 @@ RelationGetIndexPredicate(Relation relation)
* simple index keys, but attributes used in expressions and partial-index
* predicates.)
*
- * Depending on attrKind, a bitmap covering the attnums for all index columns,
- * for all potential foreign key columns, or for all columns in the configured
- * replica identity index is returned.
+ * Depending on attrKind, a bitmap covering attnums for certain columns is
+ * returned:
+ * INDEX_ATTR_BITMAP_KEY Columns in non-partial unique indexes not
+ * in expressions (i.e., usable for FKs)
+ * INDEX_ATTR_BITMAP_PRIMARY_KEY Columns in the table's primary key
+ * INDEX_ATTR_BITMAP_IDENTITY_KEY Columns in the table's replica identity
+ * index (empty if FULL)
+ * INDEX_ATTR_BITMAP_HOT_BLOCKING Columns that block updates from being HOT
+ * INDEX_ATTR_BITMAP_SUMMARIZED Columns included in summarizing indexes
*
* Attribute numbers are offset by FirstLowInvalidHeapAttributeNumber so that
* we can include system attributes (e.g., OID) in the bitmap representation.
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h
index beeb28b83cb..1637ff7152b 100644
--- a/src/include/utils/relcache.h
+++ b/src/include/utils/relcache.h
@@ -54,6 +54,10 @@ extern List *RelationGetIndexPredicate(Relation relation);
extern Datum *RelationGetIndexRawAttOptions(Relation indexrel);
extern bytea **RelationGetIndexAttOptions(Relation relation, bool copy);
+/*
+ * Possible set types returned by RelationGetIndexAttrBitmap. Update
+ * the comment atop that function if you modify this enum.
+ */
typedef enum IndexAttrBitmapKind
{
INDEX_ATTR_BITMAP_KEY,
--
2.39.2
--nczdeloqz6xwcyrq--
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/1] document RelationGetIndexAttrBitmap
In-Reply-To: <no-message-id-1854003@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox