Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb57cfb4

Browse files
committed
Document RelationGetIndexAttrBitmap better
Commit19d8e23 changed the list of set-of-columns that can bereturned by RelationGetIndexAttrBitmap, but didn't update its"documentation". That was pretty hard to read already, so rewrite tomake it more comprehensible, adding the missing values while at it.Backpatch to 16, like that commit.Discussion:https://postgr.es/m/20230809091155.7c7f3gttjk3dj4ze@alvherre.pgsqlReviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
1 parent4d14ccd commitb57cfb4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

‎src/backend/utils/cache/relcache.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5150,9 +5150,15 @@ RelationGetIndexPredicate(Relation relation)
51505150
* simple index keys, but attributes used in expressions and partial-index
51515151
* predicates.)
51525152
*
5153-
* Depending on attrKind, a bitmap covering the attnums for all index columns,
5154-
* for all potential foreign key columns, or for all columns in the configured
5155-
* replica identity index is returned.
5153+
* Depending on attrKind, a bitmap covering attnums for certain columns is
5154+
* returned:
5155+
*INDEX_ATTR_BITMAP_KEYColumns in non-partial unique indexes not
5156+
*in expressions (i.e., usable for FKs)
5157+
*INDEX_ATTR_BITMAP_PRIMARY_KEYColumns in the table's primary key
5158+
*INDEX_ATTR_BITMAP_IDENTITY_KEYColumns in the table's replica identity
5159+
*index (empty if FULL)
5160+
*INDEX_ATTR_BITMAP_HOT_BLOCKINGColumns that block updates from being HOT
5161+
*INDEX_ATTR_BITMAP_SUMMARIZEDColumns included in summarizing indexes
51565162
*
51575163
* Attribute numbers are offset by FirstLowInvalidHeapAttributeNumber so that
51585164
* we can include system attributes (e.g., OID) in the bitmap representation.

‎src/include/utils/relcache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ extern List *RelationGetIndexPredicate(Relation relation);
5454
externDatum*RelationGetIndexRawAttOptions(Relationindexrel);
5555
externbytea**RelationGetIndexAttOptions(Relationrelation,boolcopy);
5656

57+
/*
58+
* Which set of columns to return by RelationGetIndexAttrBitmap.
59+
*/
5760
typedefenumIndexAttrBitmapKind
5861
{
5962
INDEX_ATTR_BITMAP_KEY,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp