Re: prefix btree implementation

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: prefix btree implementation
Дата
Msg-id 1128625546.3738.44.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: prefix btree implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 2005-10-06 at 09:38 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > It might be worth teaching the optimiser that if it has an index on an
> > immutable function that if we have WHERE x = k and a functional index on
> > f(x) then we can access the functional index with 
> > f(x) = f(k), as long as we also reapply the original WHERE clause. 
> 
> As I just pointed out to Gaetano, this is utterly wrong.  We can't
> assume that much about the behavior of equality.

For any function, yes, because you can always construct a function that
violates that. But it seems straightforward to introduce another
declarative form for which it is true, similar to the way that IMMUTABLE
allows us to make other assumptions at parse time. That's only worth it
if you believe that many useful functions follow that rule; I would say
that they do.

Best Regards, Simon Riggs



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

Предыдущее
От: "Luke Lonergan"
Дата:
Сообщение: Re: [PERFORM] A Better External Sort?
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: comments on prepared transactions ...