Re: [PATCH] kNN for btree

Поиск
Список
Период
Сортировка
От Anton A. Melnikov
Тема Re: [PATCH] kNN for btree
Дата
Msg-id 47adb0b0-6e65-4b40-8d93-20dcecc21395@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [PATCH] kNN for btree  ("Anton A. Melnikov" <a.melnikov@postgrespro.ru>)
Ответы Re: [PATCH] kNN for btree
Список pgsql-hackers
Hi!

Rebased existing patch on current master to have an actual working version.
There is an inconsistency with commit 5bf748b86.

Reproduction:
CREATE TABLE test (a int4);
INSERT INTO test VALUES (2), (3);
CREATE INDEX test_idx ON test USING btree(a);
SET enable_seqscan = OFF;
SELECT * FROM test WHERE a IN (2, 3) ORDER BY a <-> 5;

Actual result:
postgres=# SELECT * FROM test WHERE a IN (2, 3) ORDER BY a <-> 5;
  a
---
  3
(1 row)

Correct expected result:
postgres=# SELECT * FROM test WHERE a IN (2, 3) ORDER BY a <-> 5;
  a
---
  3
  2
(2 rows)

Reported an issue in the thread corresponding to commit 5bf748b86.

With the best regards,


-- 
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Вложения

В списке pgsql-hackers по дате отправления: