Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Remove useless bms_copy step in RelationGetIndexAttrBitmap.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Jan 2019 23:33:32 +0000 (18:33 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Jan 2019 23:33:44 +0000 (18:33 -0500)
Seems to be from a bad case of copy-and-paste-itis in commit 665d1fad9.
It wouldn't be quite so annoying if it didn't contradict the comment
half a dozen lines above.

David Rowley

Discussion: https://postgr.es/m/CAKJS1f95Dyf8Qkdz4W+PbCmT-HTb54tkqUCC8isa2RVgSJ_pXQ@mail.gmail.com

src/backend/utils/cache/relcache.c

index d58237f5a1561c3635cd7a76e3717cbc5ef722e2..d5a1017985c88d0ecdeaaac1253d14b754d99414 100644 (file)
@@ -5063,7 +5063,7 @@ restart:
        case INDEX_ATTR_BITMAP_KEY:
            return uindexattrs;
        case INDEX_ATTR_BITMAP_PRIMARY_KEY:
-           return bms_copy(relation->rd_pkattr);
+           return pkindexattrs;
        case INDEX_ATTR_BITMAP_IDENTITY_KEY:
            return idindexattrs;
        default: