Re: [PATCH] Improve geometric types

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, emre(at)hasegeli(dot)com, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Improve geometric types
Date: 2018-09-27 20:59:17
Message-ID: 20180927205917.6uenon6hpub7qbir@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On 2018-Sep-27, Tomas Vondra wrote:

> I may be missing what you're saying, but point_mul_point is not just a
> simple multiplication of coordinates, i.e.
>
> (x1,y1) * (x2,y2) != (x1*x2, y1*y2)
>
> It essentially does this:
>
> ((x1 * x2 - y1 * y2), (x1 * y2 + x2 * y1))
>
> so I wouldn't be surprised if this was a difference between _pl and _mi.

Yeah, I had misinterpreted the operation before reading the code, then
when reading it I realized the formula is what you were saying, so I
updated the final part of my reply but failed to realize I had written
my misunderstanding in the first portion.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2018-09-27 21:02:06 Re: Segfault when creating partition with a primary key and sql_drop trigger exists
Previous Message Tom Lane 2018-09-27 20:51:39 Re: \d+ fails on index on partition