handling NULLS in GiST

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема handling NULLS in GiST
Дата
Msg-id Pine.GSO.4.33.0107161652310.24835-100000@ra.sai.msu.su
обсуждение исходный текст
Ответы Re: handling NULLS in GiST  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom,

we noticed you changed gist.c to handle NULLS. It seems there is
problem with your changes.
in gist.c
       /* GIST indexes don't index nulls, see notes in gistinsert */       if (! IndexTupleHasNulls(itup))       {
        /*
 

....... skipped ....
       /*        * Currently, GIST indexes do not support indexing NULLs; considerable        * infrastructure work
wouldhave to be done to do anything reasonable        * with a NULL.        */       if (IndexTupleHasNulls(itup))
{
 


While it's ok for single key but for multikey indexes removing tuple with NULL
looks not right. Consider (a,b,c) where C is NULL. Your changes would
remove tuple and it would be impossible to find (a,b) using this index.
Did you think  about this particular case ?

I remind we have choosen to leave NULLs because vacuum complained about
different number of tuples in heap and index and all our opclasses work
correctly with NULLs. Did you change vacuum code so it will not complain ?

In principle, if you insist on your approach, we propose to extend it
to multikey case by removing tuple if and only if leading keys are NULLs

What do you think ?
Regards,    Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: NetBSD 1.5.1(HP300)
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: handling NULLS in GiST