From: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: why partition pruning doesn't work? |
Date: | 2018-06-04 13:30:58 |
Message-ID: | CA+q6zcVX9Gp0o06AXrozc0k4zkfera_wQiSyTkKXzgCsEqM6Yg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 3 June 2018 at 19:11, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dmitry Dolgov <9erthalion6(at)gmail(dot)com> writes:
>> Just to clarify for myself, for evaluating any stable function here would it be
>> enough to handle all function-like expressions (FuncExpr / OpExpr /
>> DistinctExpr / NullIfExpr) and check a corresponding function for provolatile,
>> like in the attached patch?
>
> I think the entire approach is wrong here. Rather than concerning
> yourself with Params, or any other specific expression type, you
> should be using !contain_volatile_functions() to decide whether
> an expression is run-time-constant. If it is, use the regular
> expression evaluation machinery to extract the value.
Yes, it makes sense. Then, to my understanding, the attached code is close to
what was described above (although I'm not sure about the Const part).
Attachment | Content-Type | Size |
---|---|---|
partpruning_stable_func_v2.patch | text/x-patch | 2.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Benjamin Scherrey | 2018-06-04 13:33:12 | Re: Code of Conduct plan |
Previous Message | Jesper Pedersen | 2018-06-04 13:13:44 | Re: New committers announced at PGCon 2018 |