Re: knngist - 0.8

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: knngist - 0.8
Дата
Msg-id AANLkTimfqa-RUn9w-u=1C=t_8kP3frVJ7WdmhBXqnRTV@mail.gmail.com
обсуждение исходный текст
Ответ на Re: knngist - 0.8  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: knngist - 0.8  (Oleg Bartunov <oleg@sai.msu.su>)
Re: knngist - 0.8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2010/9/13 Teodor Sigaev <teodor@sigaev.ru>:
> [updated patch]

I realize I'm repeating myself, but...  this patch needs
documentation.  It's not optional.

It seems to me that you need to do something about AMOPSTRATEGY.
Hence the five-key syscaches patches I wrote that is sitting in queue.And also LookupOpClassInfo().  Am I confused?

Is there a reason we're using a boolean 'amoporder' distinguish
ordering operators from regular old operators?  Tom and I were talking
about some kind of an integer field, in case we need more categories
later.  You know, like 'amopcategory' or something like that.  It
could be just one byte, perhaps, but one bit seems unduly narrow.  You
could define constants OPCAT_QUAL and OPCAT_ORDER, or something like
that.

This error message seems like it ought to be complaining about the
access method, not the index:

+               if (!pg_am->amcanorderbyop)
+                       ereport(ERROR,
+
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
+                                        errmsg("index doesn't support
ordering operations")));

I sort of understand the reasons behind the following restriction, but
is this truly the best we can do?

+               /*
+                * Currently, only descending and nulls last ordering
is supported
+                */
+               if (!(pathkey->pk_strategy == BTLessStrategyNumber &&
pathkey->pk_nulls_first == false))
+                       return;

What happens if we have an index strategy that can efficiently return
the points most distant from the bright center of the universe?

By the way:

gistproc.c: In function ‘gist_point_consistent’:
gistproc.c:1023: error: ‘distance’ may be used uninitialized in this function

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: elog during holding a spinlock is safe?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: top-level DML under CTEs