Re: pgsql: Allow GIN's extractQuery method to signal that nothing can - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Allow GIN's extractQuery method to signal that nothing can
Date
Msg-id 26945.1170261473@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Allow GIN's extractQuery method to signal that nothing can  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: pgsql: Allow GIN's extractQuery method to signal that nothing can  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-committers
Teodor Sigaev <teodor@sigaev.ru> writes:
> amcanmulticol doesn't resolve issue, because restriction clause might present,
> but it might have not any actual values ( void tsquery, void array ) and
> semantic meaning of void query might be a 'any tuple matches'. Suggested
> gincostestimation's patch allows to prevent from index in some situations, I
> imagine, that isn't a good solution for two reason:
>   - high cost doesn't guarantee an indexscan will be choosen
>   - Doesn't work with anything except Const query
> But I didn't  find a better place to insert it to resolve first point.

If you're going to support operators that could allow every tuple to
match, then I think you had better find a way to allow a full index scan
within GIN.  Because the above does not fix the problem, it's only a
very crude band-aid; you *cannot* assume that you'll always have Consts
to look at.

            regards, tom lane

pgsql-committers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: pgsql: Allow GIN's extractQuery method to signal that nothing can
Next
From: Teodor Sigaev
Date:
Subject: Re: pgsql: Allow GIN's extractQuery method to signal that nothing can