Hello David,

you wrote:

v4 patch attached. If nobody else wants to look at this then I'm planning on pushing it soon.

Had a very brief look at this bit caught my attentioon:

+               EEO_CASE(EEOP_HASHDATUM_NEXT32_STRICT)
+               {
+                       FunctionCallInfo fcinfo = op->d.hashdatum.fcinfo_data;
+                       uint32          existing_hash = 
DatumGetUInt32(*op->resvalue);
+                       uint32          hashvalue;
+
+                       /* combine successive hash values by rotating */
+                       existing_hash = pg_rotate_left32(existing_hash, 1);
+
+                       if (fcinfo->args[0].isnull)
+                       {

Is it nec. to rotate existing_hash here before checking for isnull? Because in case of isnull, isn't the result of the rotate thrown away?

Or in other words, mnaybe this bit here can be moved to after the isnull check:

+                       /* combine successive hash values by rotating */
+                       existing_hash = pg_rotate_left32(existing_hash, 1);

--
Best regards,

Tels


Reply via email to