From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-bugs(at)postgresql(dot)org, Martin Atukunda <matlads(at)gmail(dot)com> |
Subject: | Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist |
Date: | 2010-12-27 21:14:19 |
Message-ID: | 201012272114.oBRLEJs04232@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Heikki Linnakangas wrote:
> On 05.12.2010 18:26, Tom Lane wrote:
> > Andres Freund<andres(at)anarazel(dot)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.
>
> Sounds like we'd still want to just replace ARR_HASNULL() with something
> more intelligent in back-branches though.
Added to TODO:
Improve GIN's handling of NULL array values
* http://archives.postgresql.org/pgsql-bugs/2010-12/msg00032.php
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-12-27 21:41:03 | Re: BUG #5797: Strange bug with hstore |
Previous Message | Bruce Momjian | 2010-12-27 20:35:02 | Re: BUG #5781: unaccent() function should be marked IMMUTABLE |