Re: Shapes on the regression test for polygon - Mailing list pgsql-hackers

From Emre Hasegeli
Subject Re: Shapes on the regression test for polygon
Date
Msg-id 20140725085311.GA82218@hasegeli-2.local
Whole thread Raw
In response to Re: Shapes on the regression test for polygon  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Shapes on the regression test for polygon  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Introducing coarse grain parallelism by postgres_fdw.
Next
From: Etsuro Fujita
Date:
Subject: Re: refactoring allpaths.c (was Re: Suppressing unused subquery output columns)