Re: index on user defined type

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: index on user defined type
Дата
Msg-id 1105582355.2886.396.camel@jeff
обсуждение исходный текст
Ответ на Re: index on user defined type  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: index on user defined type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Wed, 2005-01-12 at 18:12 -0500, Tom Lane wrote:
> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > I'm wondering if the function under = is an SQL function being inlined.
>
> Bingo --- that's surely it.  After inlining, the expression would no
> longer look like it matched the index.
>
> You don't want to use SQL functions to define indexable operators
> anyway.  They leak memory, and are slow, and neither of those are
> good properties for an index support function.
>
>             regards, tom lane

Thanks very much guys. I got confused and tried to simplify it to a
simple test case and confused myself more when it still didn't work.
Just to be sure I redid it in plpgsql with no problems.

I understand that index operations should be written in C for production
use, or at least tested in C to see if it helps matters. Comparison
operators are of course very simple to write in any language anyway.

I attached a proposed documentation patch. I wasn't able to readily see
the implications of writing a function in SQL regarding an index, so
perhaps this will help someone in the future (not that many people will
attempt writing index access methods in SQL, but someone could get
confused like I did).

Regards,
    Jeff Davis


Вложения

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

Предыдущее
От: Josué Maldonado
Дата:
Сообщение: Re: Postgresql Text field / Visual FoxPro Memo and ODBC
Следующее
От: Paul Tillotson
Дата:
Сообщение: Re: Postgresql Text field / Visual FoxPro Memo and ODBC