From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: plans for PostgreSQL 12 |
Date: | 2018-06-04 19:53:04 |
Message-ID: | 5880.1528141984@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2018-06-04 9:59 GMT+02:00 Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>:
>> On 04/06/18 09:37, Pavel Stehule wrote:
>>> Yes, it is incorrect mark. Unfortunately - this is often workaround for
>>> wrong estimations - so I afraid, in this case, your proposed fix breaks
>>> lot of applications.
>> I would say such applications are already broken.
> I cannot to agree, not in this moment:
> 1. there is not any workaround, how to force subselect evaluation in
> planning time - what can be correct for once only evaluated queries.
There's the sadly-underdocumented trick of writing the expression inside
a sub-select so that it becomes an InitPlan. We could doubtless improve
our support for that --- for instance, teach estimate_expression_value()
how to get an estimated value when the expression is stable --- but I'm
unconvinced that we need new infrastructure for this. Inventing a new
function volatility class would be an enormous mess from users'
standpoint, especially if the reason was only to distinguish cheating
uses from non-cheating uses of the existing class. I am not inclined
to promise that we'll never break cheating uses.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2018-06-04 20:24:52 | Re: plans for PostgreSQL 12 |
Previous Message | Alvaro Herrera | 2018-06-04 19:32:08 | Re: Remove mention in docs that foreign keys on partitioned tables are not supported |