Re: BUG #4814: Segmentation fault when using indexed prefix FT search - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4814: Segmentation fault when using indexed prefix FT search
Date
Msg-id 7385.1242611957@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4814: Segmentation fault when using indexed prefix FT search  ("Dennis Noordsij" <dennis.noordsij@helsinki.fi>)
List pgsql-bugs
"Dennis Noordsij" <dennis.noordsij@helsinki.fi> writes:
> create table foo ( ts  tsvector not null );
> create index foo_idx on foo using gin(ts);
> insert into foo values (to_tsvector('Lore ipsum'));
> select * from foo where 'ipsu:*'::tsquery @@ ts;
> [crash]

Hmm.  It rather looks to me like this

        cmp = DatumGetInt32(FunctionCall4(&ginstate->comparePartialFn[attrnum],

should be this

        cmp = DatumGetInt32(FunctionCall4(&ginstate->comparePartialFn[attrnum-1],

which leaves me with even less of a warm and fuzzy feeling about
matchPartialInPendingList() than I had before.  How much has that code
been tested at all?  It seems quite clear that it's not exercised by
any regression test ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Dennis Noordsij"
Date:
Subject: BUG #4814: Segmentation fault when using indexed prefix FT search
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #4812: statistics not available on tables containing only hstore column