From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | rui hua <365507506hua(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Revive line type |
Date: | 2013-06-27 01:34:37 |
Message-ID: | 1372296877.5915.5.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers Postg토토 캔SQL : Postg토토 |
On Sun, 2013-06-23 at 12:24 +0800, rui hua wrote:
> Regression tests are all succeed, but several problems have be found while
> ding some simple test. The updated document said that the points used in
> the output are not necessarily the points used on input. I understand that
> as long as they are marked on the same line. But when the input data
> represents a horizontal or vertical line, the output is not exactly the
> same line. It is another line parallel to it.
> postgres=# select line('1,3,2,3');
> line
> -----------------
> [(0,-3),(1,-3)]
> (1 row)
This was just using the wrong sign. Fixed.
> In addition, when a straight line coincides with coordinate axis, output
> appears -0, I do not know whether it is appropriate.
This is a matter of the floating-point operations. I don't think it's
on scope to worry about that. With the above fix, the cases you pointed
out go away anyway.
> Negative value appeared when use <-> to calculate the distance between two
> parallel lines.
Fixed with fabs().
New patch included. Still wondering whether to use a A,B,C-based output
format per Tom's comment.
Attachment | Content-Type | Size |
---|---|---|
0001-Revive-line-type.patch | text/x-patch | 20.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Kupershmidt | 2013-06-27 01:36:00 | Re: fixing pg_ctl with relative paths |
Previous Message | Amit Langote | 2013-06-27 00:44:15 | Re: Computer VARSIZE_ANY(PTR) during debugging |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2013-07-09 00:35:47 | [9.4 CF] Free VMs for Reviewers & Testers |
Previous Message | Josh Berkus | 2013-06-24 17:42:25 | Re: A would-be reviewer writes... |