From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Nested CASE-WHEN scoping |
Date: | 2011-05-25 17:27:02 |
Message-ID: | 4DDD3BE6.7090704@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 25.05.2011 20:11, Tom Lane wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> On 25.05.2011 17:47, Tom Lane wrote:
>>> [ scratches head ... ] Why does the save/restore in ExecEvalCase not
>>> take care of this?
>
>> The mistake happens during planning, when the SQL function is inlined
>> and pre-evaluated.
>
> Hm. I'm inclined to think this may be more of a bug in the inlining
> process than anything else.
Well, if you want to get away without the capability to reference
multiple CaseTestExprs at a time, you'll have to detect the danger and
abort the inlining process. That's a bit pessimal, although this is a
pretty artificial case in the first place so maybe we don't care much.
(I'm still going to need more placeholder slots to handle IN and
BETWEEN. Of course, I can just copy-paste CaseTestExpr into something
like InTestExpr and BetweenTestExpr, but it seems like it would be good
to unite all that infrastructure)
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-05-25 17:29:05 | Re: tackling full page writes |
Previous Message | Cédric Villemain | 2011-05-25 17:24:01 | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |