On Wed, 8 Apr 2020 at 01:16, John Naylor <john.nay...@2ndquadrant.com> wrote: > > On Tue, Apr 7, 2020 at 8:26 PM David Rowley <dgrowle...@gmail.com> wrote: > > > > Hi John, > > > > Thanks for having a look at this. > > > > On Wed, 8 Apr 2020 at 00:16, John Naylor <john.nay...@2ndquadrant.com> > > wrote: > > > Overall looks good to me. Just a couple things I see: > > > > > > It seems _hash_log2 is still in the tree, but has no callers? > > > > Yeah, I left it in there since it was an external function. Perhaps > > we could rip it out and write something in the commit message that it > > should be replaced with the newer functions. Thinking of extension > > authors here. > > I'm not the best judge of where to draw the line for extensions, but > this function does have a name beginning with an underscore, which to > me is a red flag that it's internal in nature.
OK. I've removed that function now and stuck a note in the commit message to mention an alternative. > Hmm. Does pg_bitutils.h need something like this? > > #ifndef FRONTEND > extern PGDLLIMPORT const uint8 pg_leftmost_one_pos[256]; > extern PGDLLIMPORT const uint8 pg_rightmost_one_pos[256]; > extern PGDLLIMPORT const uint8 pg_number_of_ones[256]; > #else > extern const uint8 pg_leftmost_one_pos[256]; > extern const uint8 pg_rightmost_one_pos[256]; > extern const uint8 pg_number_of_ones[256]; > #endif Yeah, looking at keywords.h, we hit this before in c2d1eea9e75. Your proposed fix works and is the same as in keywords.h, so I've gone with that. I've attached v8 of the patchset. David
v8-0001-Add-functions-to-calculate-the-next-power-of-2.patch
Description: Binary data
v8-0002-Modify-various-power-2-calculations-to-use-new-he.patch
Description: Binary data
v8-0003-Modify-additional-power-2-calculations-to-use-new.patch
Description: Binary data