Re: FIX : teach expression walker about RestrictInfo - Mailing list pgsql-hackers

From Tom Lane
Subject Re: FIX : teach expression walker about RestrictInfo
Date
Msg-id 34910.1430279702@sss.pgh.pa.us
Whole thread Raw
In response to Re: FIX : teach expression walker about RestrictInfo  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: FIX : teach expression walker about RestrictInfo
List pgsql-hackers
Tomas Vondra <tomas.vondra@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
>> other bad idea.

> That's not what I said, though. I said that calling pull_varnos() causes 
> the issue - apparently that does not happen in master, but I ran into 
> that when hacking on a patch.

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 your problem very fully, but in general most code in the planner
should be well aware of whether it is working with a RestrictInfo (or list
of same) or a bare expression.  I don't believe that it's a very good idea
to obscure that distinction.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: shared_libperl, shared_libpython
Next
From: Tom Lane
Date:
Subject: Re: improving speed of make check-world