Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)
Date
Msg-id 16229.1243362013@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, May 26, 2009 at 10:09 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't trust filterdiff one bit :-(

> For any particular reason, or just natural skepticism?

IIRC it was demonstrated to be broken the last time it was proposed
as a solution to our problems.  Maybe it's been fixed since then, but
I don't have any confidence in it, since evidently it's not been stress
tested very hard.

> I believe there have been some wild-eyed claims tossed around in this
> space previously that unified diffs don't provide all the same
> information as context diffs, which is flatly false.

No, the gripe has always been just that they're less readable for
nontrivial changes.

> The not-so-nice thing about unified diffs is that when there is a huge
> hunk of code that's changed, there are probably by chance a few
> identical lines buried in there, like "    }", so the + and - lines
> end up mixed together in a way that wouldn't happen in a context diff
> (which would turn the whole thing into two big "!" sections).  It's no
> problem for a machine to understand this, but it's hard to read for a
> human being.

Exactly.  Even without identical lines, I find that the old and new code
gets intermixed in easily-confusing ways.  -u is very readable for
isolated single-line changes, but for anything larger, not so much.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A couple of gripes about the gettext plurals patch
Next
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)