Re: pgsql: Allow GIN's extractQuery method to signal that nothing can

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Allow GIN's extractQuery method to signal that nothing can
Дата
Msg-id 26326.1170258015@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Allow GIN's extractQuery method to signal that nothing can  (teodor@postgresql.org (Teodor Sigaev))
Ответы Re: pgsql: Allow GIN's extractQuery method to signal that nothing can
Список pgsql-committers
teodor@postgresql.org (Teodor Sigaev) writes:
> Log Message:
> -----------
> Allow GIN's extractQuery method to signal that nothing can satisfy the query.
> In this case extractQuery should returns -1 as nentries. This changes
> prototype of extractQuery method to use int32* instead of uint32* for
> nentries argument.
> Based on that gincostestimate may see two corner cases: nothing will be found
> or seqscan should be used.

This patch contains some pretty ugly coding in gincostestimate that
thinks it must go out of its way to prevent full indexscans.  But
(a) it does not work (you cannot positively guarantee a plan will not
be chosen just by setting its cost high) and (b) it is unnecessary.
pg_am.amoptionalkey = false is the right way, and you already have that.
So please remove the klugery in gincostestimate.

            regards, tom lane

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

Предыдущее
От: teodor@postgresql.org (Teodor Sigaev)
Дата:
Сообщение: pgsql: Update FreeBSD DocBook installation notices
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: pgsql: Allow GIN's extractQuery method to signal that nothing can