Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2016-03-20 Thread Tom Lane
Robert Haas writes: > On Wed, Apr 29, 2015 at 12:33 PM, Tomas Vondra > wrote: >> On 04/29/15 18:26, Tom Lane wrote: >>> But there are basic reasons why expression_tree_walker should not try >>> to deal with RestrictInfos; the most obvious one being that it's not >>> clear whether it should descen

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 3:29 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Apr 29, 2015 at 12:33 PM, Tomas Vondra >> wrote: >>> On 04/29/15 18:26, Tom Lane wrote: But there are basic reasons why expression_tree_walker should not try to deal with RestrictInfos; the most obvious o

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2016-03-19 Thread Tomas Vondra
On 03/18/2016 08:53 PM, Robert Haas wrote: On Fri, Mar 18, 2016 at 3:29 PM, Tom Lane wrote: Robert Haas writes: On Wed, Apr 29, 2015 at 12:33 PM, Tomas Vondra wrote: On 04/29/15 18:26, Tom Lane wrote: But there are basic reasons why expression_tree_walker should not try to deal with Restri

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2016-03-19 Thread Robert Haas
On Wed, Apr 29, 2015 at 12:33 PM, Tomas Vondra wrote: > On 04/29/15 18:26, Tom Lane wrote: >> Tomas Vondra writes: >>> OK, let me explain the context a bit more. When working on the >>> multivariate statistics patch, I need to choose which stats to use for >>> estimating the clauses. I do that in

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-06-15 Thread Tomas Vondra
On 04/29/15 18:33, Tomas Vondra wrote: OK, I do understand that. So what about pull_varnos_walker and pull_varattnos_walker - what about teaching them about RestrictInfos? Attached is a patch fixing the issue by handling RestrictInfo in pull_varnos_walker and pull_varattnos_walker. -- Tom

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-29 Thread Tomas Vondra
On 04/29/15 18:26, Tom Lane wrote: Tomas Vondra writes: ... OK, let me explain the context a bit more. When working on the multivariate statistics patch, I need to choose which stats to use for estimating the clauses. I do that in clauselist_selectivity(), although there might be other places

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-29 Thread Tom Lane
Tomas Vondra writes: > On 04/29/15 05:55, Tom Lane wrote: >> pull_varnos is not, and should not be, applied to a RestrictInfo; for one >> thing, it'd be redundant with work that was already done when creating the >> RestrictInfo (cf make_restrictinfo_internal). You've not shown the >> context of

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-29 Thread Tomas Vondra
Hi, On 04/29/15 05:55, Tom Lane wrote: Tomas Vondra writes: On 04/28/15 21:50, Tom Lane wrote: RestrictInfo is not a general expression node and support for it has been deliberately omitted from expression_tree_walker(). So I think what you are proposing is a bad idea and probably a band-aid

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tom Lane
Tomas Vondra writes: > On 04/28/15 21:50, Tom Lane wrote: >> RestrictInfo is not a general expression node and support for it has >> been deliberately omitted from expression_tree_walker(). So I think >> what you are proposing is a bad idea and probably a band-aid for some >> other bad idea. > T

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tomas Vondra
Hi, On 04/28/15 21:50, Tom Lane wrote: Tomas Vondra writes: the attached trivial patch adds handling of RestrictInfo nodes into expression_tree_walker(). RestrictInfo is not a general expression node and support for it has been deliberately omitted from expression_tree_walker(). So I think

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tom Lane
Tomas Vondra writes: > the attached trivial patch adds handling of RestrictInfo nodes into > expression_tree_walker(). RestrictInfo is not a general expression node and support for it has been deliberately omitted from expression_tree_walker(). So I think what you are proposing is a bad idea an