Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
Дата
Msg-id 26741.1291570005@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> On Sunday 05 December 2010 17:42:59 Tom Lane wrote:
>> I think the reason the given example fails is just that it's all being
>> done in one transaction.  If the null-containing row were known dead
>> it wouldn't get indexed.  So: commit.

> Um I doubt it.

[ gets out gdb... ]  Oh: the reason GIN is complaining is that it's just
looking at ARR_HASNULL(), and the array's has-nulls flag is still set
because we don't bother to try to clear it after replacing one element
of the array.  (Which in general would be an expensive thing to try to
do...)

If we were intending to leave GIN in its current nulls-hating state,
the thing to do would be to replace the stupid ARR_HASNULL check with
something more intelligent.  But really it needs to be fixed to handle
nulls properly, so I'm thinking that might be a dead-end patch.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #5783: plpythonu bool behavior change
Следующее
От: Martin Atukunda
Дата:
Сообщение: Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist