Re: Add missing operator <->(box, point)

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Add missing operator <->(box, point)
Date: 2019-07-11 16:13:49
Message-ID: CAPpHfdu7nnU_CYWhf1afDQqKnBAzaA60m8eBLTYsjH6BFb1kWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 9, 2019 at 12:03 AM Alexander Korotkov
<a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> On Mon, Jul 8, 2019 at 11:39 PM Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru> wrote:
> > On 08.07.2019 18:22, Alexander Korotkov wrote:
> > For me it doesn't look worth having two distinct functions
> > gist_box_distance_helper() and gist_bbox_distance(). What about
> > having just one and leave responsibility for recheck flag to the
> > caller?
> >
> > gist_bbox_distance() was removed.
>
> OK.
>
> > But maybe it would be better to replace two identical functions
> > gist_circle_distance() and gist_poly_distance() with the single
> > gist_bbox_distance()?
>
> Sounds reasonable to me.

However, gist_poly_distance() and gist_circle_distance() have
different signatures. Having same internal function to be
corresponding to more than one catalog function cause troubles in
sanity checks. So, let's leave it as it is.

Revised patchset is attached. It contains commit messages as well as
minor editorialization.

I'm going to push this if no objections.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0001-Add-missing-distance-operators-v04.patch application/octet-stream 95.5 KB
0002-Add-operator-box-point-to-GiST-box_ops-v04.patch application/octet-stream 9.3 KB
0003-Add-operator-box-point-to-SP-GiST-box_ops-v04.patch application/octet-stream 9.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-07-11 16:20:14 Re: pgbench - add option to show actual builtin script code
Previous Message Dave Cramer 2019-07-11 16:08:54 Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)