Thursday, July 17, 2008

Re: [HACKERS] [PATCH]-hash index improving

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Xiao Meng escribió:
>> You can undefine the macro HASHVALUE_ONLY in hash.h to get the
>> original implementation.

> I think having the HASHVALUE_ONLY define is not a good idea -- it just
> makes the patch harder to read.

While we are griping about readability: failure to update the comments
to match the code is NOT, NOT, NOT acceptable. I had barely started
to read the patch before encountering this insult to the reader:

/* Hash indexes are never lossy (at the moment anyway) */
- scan->xs_recheck = false;
+#ifdef HASHVALUE_ONLY
+ scan->xs_recheck = true;
+#else
+ scan->xs_recheck = false;
+

No comments: