Re: pruning disabled for array, enum, record, range type partitionkeys

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pruning disabled for array, enum, record, range type partitionkeys
Дата
Msg-id 20180417221118.6jxa42h3k37eof6d@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pruning disabled for array, enum, record, range type partitionkeys  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: pruning disabled for array, enum, record, range type partitionkeys  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Amit Langote wrote:

> Ah, I think I got it after staring at the (btree) index code for a bit.
> 
> What pruning code got wrong is that it's comparing the expression type
> (type of the constant arg that will be compared with partition bound
> datums when pruning) with the partopcintype to determine if we should look
> up the cross-type comparison/hashing procedure, whereas what the latter
> should be compare with is the clause operator's oprighttype.  ISTM, if
> op_in_opfamily() passed for the operator, that's the correct thing to do.

I wonder why you left out the hash partitioning case?  I don't really
know that this is correct, but here's a delta patch as demonstration.

(v3 is your patch, I think the only change is I renamed the tables used
in the test)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [sqlsmith] Unpinning error in parallel worker