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

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

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

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

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. --

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 tomas.von...@2ndquadrant.com 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

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

2015-04-29 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com 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

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 tomas.von...@2ndquadrant.com 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

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

2015-04-28 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com 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

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 tomas.von...@2ndquadrant.com 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

[HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tomas Vondra
Hi there, the attached trivial patch adds handling of RestrictInfo nodes into expression_tree_walker(). This is needed for example when calling pull_varnos or (or other functions using the expression walker) in clausesel.c, for example. An example of a query causing errors with pull_varnos

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

2015-04-28 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com 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