Re: Shapes on the regression test for polygon

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Shapes on the regression test for polygon
Date: 2014-07-25 08:53:11
Message-ID: 20140725085311.GA82218@hasegeli-2.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Well, I think the number of tabs that makes them look best depends on
> your tab-stop setting. At present, I find that with 8-space tabs
> things seem to line up pretty well, whereas with your patch, 4-space
> tabs line up well. Either way, I have no idea what the picture is
> supposed to mean, because it looks to me like the original picture has
> circles at (3,3) and (2,1) and plus signs at (2,2), (3,1), and (4,0).
> With your patch applied, the circle at (2,1) has moved to (2,0.5). I
> can't correlate any of this to the test cases you modified (and which
> I see no reason to modify, whether they match the picture or not).

4 space tab-stop is not the project standard?

The circle I moved does not represent a corner of the polygon. I just
moved it to make the line straight after the tabs.

> And really, if the diagram is confusing, let's just remove it. We
> don't really need our regression test comments to illustrate what a
> triangle looks like, or how to do bad ASCII art.
>
> Personally, though, my vote would be to just leave it the way it is.
> I don't think there's really a problem here in need of solving.

I am sorry for taking your time for such a low priority problem, but
as we stumble across this, let me to make the change more clear.
According to git blame the tests with the shapes added by 04688df6.
The coordinates was written in the old format like this:

(3.0,3.0,1.0,1.0,3.0,0.0)

These are changed by 3d9584c9 to the new format like this:

(3.0,1.0),(3.0,3.0),(1.0,0.0)

In my opinion, the real intention of the first commit was to write
them in the new format like this:

(3.0,3.0),(1.0,1.0),(3.0,0.0)

It makes sense because the corners match the shape. So, I changed it
that way. If we will not going to change the tests, It would be okay
to just remove the shapes. I do not think they add more value to
the tests.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2014-07-25 09:30:30 Re: refactoring allpaths.c (was Re: Suppressing unused subquery output columns)
Previous Message Kyotaro HORIGUCHI 2014-07-25 08:35:04 Introducing coarse grain parallelism by postgres_fdw.