From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: FIX : teach expression walker about RestrictInfo |
Date: | 2015-04-28 19:50:04 |
Message-ID: | 34353.1430250604@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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 proposing is a bad idea and probably a band-aid for some
other bad idea.
> 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 is
> select * from t where (a >= 10 and a <= 20) or (b >= 15 and b <= 20);
Really?
regression=# create table t (a int, b int);
CREATE TABLE
regression=# select * from t where (a >= 10 and a <= 20) or (b >= 15 and b <= 20);
a | b
---+---
(0 rows)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-04-28 19:59:11 | Re: cache invalidation for PL/pgsql functions |
Previous Message | Bruce Momjian | 2015-04-28 19:50:00 | Re: COPY and file_fdw with fixed column widths |