|From:||Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>|
|To:||Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Cc:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|Subject:||Re: Add missing operator <->(box, point)|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Attached 3rd version of the patches.
On 02.07.2019 21:55, Alexander Korotkov wrote:
> On Tue, Jul 2, 2019 at 9:19 PM Nikita Glukhov<n(dot)gluhov(at)postgrespro(dot)ru> wrote:
>> We could use commuted "const <-> var" operators for kNN searches, but the
>> current implementation requires the existence of "var <-> const" operators, and
>> order-by-op clauses are rebuilt using them (see match_clause_to_ordering_op()
>> at /src/backend/optimizer/path/indxpath.c).
> But probably it's still worth to just add commutator for every <->
> operator and close this question. Otherwise, it may arise again once
> we want to add some more kNN support to opclasses or something. On
> the other hand, are we already going to limit oid consumption?
All missing distance operators were added to the first patch.
On 08.07.2019 18:22, Alexander Korotkov wrote:
> On Mon, Mar 11, 2019 at 2:49 AM Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru> wrote:
>> 2. Add <-> to GiST box_ops.
>> Extracted gist_box_distance_helper() common for gist_box_distance() and
> 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
gist_bbox_distance() was removed.
But maybe it would be better to replace two identical functions
gist_circle_distance() and gist_poly_distance() with the single
>> 3. Add <-> to SP-GiST.
>> Changed only catalog and tests. Box case is already checked in
>> out->recheckDistances = distfnoid == F_DIST_POLYP;
> So, it seems to be fix of oversight in 2a6368343ff4. But assuming
> fixing this requires catalog changes, we shouldn't backpatch this.
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
|Next Message||Bruce Momjian||2019-07-08 20:41:50||Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)|
|Previous Message||Alvaro Herrera||2019-07-08 20:33:03||Re: Ltree syntax improvement|