RelationGetIndexAttrBitmap() small deviation between comment and code - Mailing list pgsql-hackers

From David Rowley
Subject RelationGetIndexAttrBitmap() small deviation between comment and code
Date
Msg-id CAKJS1f95Dyf8Qkdz4W+PbCmT-HTb54tkqUCC8isa2RVgSJ_pXQ@mail.gmail.com
Whole thread Raw
Responses Re: RelationGetIndexAttrBitmap() small deviation between comment and code  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
(This is pretty minor, but I struggled to ignore it)

In RelationGetIndexAttrBitmap() a comment claims /* We return our
original working copy for caller to play with */. 3 of the 4 possible
Bitmapsets follow that comment but for some reason, we make a copy of
the primary key attrs before returning.  This seems both unnecessary
and also quite out of sync to what all the other Bitmapsets do.   I
don't quite see any reason for doing it so I assume there's none.

The attached removes the bms_copy() and just returns the set that's
already been built in the same memory context.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: should ConstraintRelationId ins/upd cause relcache invals?
Next
From: Andres Freund
Date:
Subject: Re: Allowing extensions to find out the OIDs of their member objects