Re: Nested CASE-WHEN scoping
От | Heikki Linnakangas |
---|---|
Тема | Re: Nested CASE-WHEN scoping |
Дата | |
Msg-id | 4DDD3BE6.7090704@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Nested CASE-WHEN scoping (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On 25.05.2011 20:11, Tom Lane wrote: > Heikki Linnakangas<heikki.linnakangas@enterprisedb.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
В списке pgsql-hackers по дате отправления: