Re: Selectivity estimation for intarray with @@

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Selectivity estimation for intarray with @@
Дата
Msg-id CAPpHfdusKwuLxv6SJixFT8XV5S578VH2iGHR2=HzE_PFiTkfLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Selectivity estimation for intarray with @@  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
On Tue, Jul 21, 2015 at 5:14 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:
Some notices about code:

1 Near function transformOperator() there is wrong operator name "@<"

Fixed.
 
2 int_query (and intquery) should be replaced to query_int to be consistent with actual type name. At least where it's used as separate lexeme.

Fixed.
 
3 For historical reasons @@ doesn't commutate with itself, it has a commutator ~~. Patch assumes that @@ is self-commutator, but ~~ will use  'contsel' as a restrict estimation. Suppose, we need to declare ~~ as deprecated and introduce commutating @@ operator.

I think deprecating ~~ is a subject of separate patch. I fixed patch behavior in the different way. @@ and ~~ are now handled by the same function. The function handles "var @@ const" and "const ~~ var", but doesn't handle "const @@ var" and "var  ~~ const". It determines the case by type of variable: it should be int[].

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
 
Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] postgres_fdw extension support
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Selectivity estimation for intarray with @@