Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1RWJ-0006IU-Aj for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jul 2013 01:36:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V1RWI-0007Yc-MI for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jul 2013 01:36:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1RWH-0007YV-3n for pgsql-hackers@postgresql.org; Tue, 23 Jul 2013 01:36:05 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1RWE-00085r-Kh for pgsql-hackers@postgresql.org; Tue, 23 Jul 2013 01:36:04 +0000 Received: from [192.168.1.110] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0M15EC-1U8ETB1676-00tDtW; Tue, 23 Jul 2013 03:36:01 +0200 Message-ID: <51EDDE00.6040308@2ndQuadrant.com> Date: Mon, 22 Jul 2013 21:36:00 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Peter Eisentraut CC: pgsql-hackers Subject: Re: [PATCH] Revive line type References: <1372296877.5915.5.camel@vanquo.pezone.net> In-Reply-To: <1372296877.5915.5.camel@vanquo.pezone.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:luivNzY6DZ/tUyfDJGXKxQHEgXwW/r0TSnYECcCoh0t +v+SYyHSeaA6lzWh8qYTkPROzF2pOdeM01uY+Mmsoi5jbB9Oxv f4qJTrMqUbk6huxxaft3mPoLLhyxS79Be4i/HDq/sG080cOheG QPyBOhtX5eg8JR8bwwR6HvGZR8T4WF4g+ysK4sIbY7xkTe17uv FGRYM6O76jdjxMsv+tuj237Q9B8LCc9PvF7VjR5uhQaSGk2VRk dlULqDA4ZszqYmrC73OYMkUcSoN+8B0m9i7srxTfrJ+TmNclvk SxSbMcmZ/ZdjFoQ3Bf8xmiMvB/YWy6/CddM1n3v4ugf8x8pcp4 OEwogWjMI2kySz1F7iMs= X-Pg-Spam-Score: -0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 6/26/13 9:34 PM, Peter Eisentraut wrote: > Still wondering whether to use a A,B,C-based output > format per Tom's comment. Wouldn't it also be helpful to remove "The points used in the output are not necessarily the points used on input" by making that not true? There are three obvious ways you might output a line: -Math class expectations of slope-intercept form: y = mx + b. Intercept forms don't handle both horizontal and vertical lines though, so that's easily out. -Pair of points. A casual observer might get lucky and observe putting a pair of points in and getting the same pair back again, then incorrectly assume that's normally the case. Seems better to never make that possible in the infinite line case. I'm reminded of how row output usually is in order gives a bad impression about ordering guarantees in SQL. -Ax+By+C=0 Outputting that third one, when it's also the internal form, handles any time of line; will show any assumptions about individual points being preserved are wrong; and avoids rounding errors too. The only downside seems to be that bounded lines are easier to show with a pair of points. I think that suggests an alternate, secondary output format would be useful though, rather than that a different default one is a good idea. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers