Re: query planner does not canonicalize infix operators
От | Dimitri Fontaine |
---|---|
Тема | Re: query planner does not canonicalize infix operators |
Дата | |
Msg-id | m2r4vpz7wr.fsf@2ndQuadrant.fr обсуждение исходный текст |
Ответ на | Re: query planner does not canonicalize infix operators (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: query planner does not canonicalize infix operators
|
Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes: > More generally, I'm not prepared to buy into the idea that the planner > should be expected to recognize alternate spellings of "the same" > expression. There are too many variants of that idea that are > infeasible either because the planner doesn't have the necessary > knowledge, or it does but trying to recognize the equivalence would cost > an impractical number of planning cycles. Neither of those objections > apply to "replace an operator by its underlying function"; but they do > apply to other comparable requests we've gotten such as "recognize that > x + 0 is the same as x" or "x + 1 is the same as 1 + x". Looks like we're missing out some operator properties, like the neutral element and if the operator is transitive, commutative or associative. I think I remember us talking about how knowing about operators being associative would also help optimize a class of join problems. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
В списке pgsql-hackers по дате отправления: