Re: Nested CASE-WHEN scoping
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-05-30T14:21:30Z
Lists: pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes: > I think we can work around both of those by just saving and restoring > the value of each Param that we set while evaluating an expression, Huh? That's a waste of time and effort. Just make sure that each such spot has its own Param number. That's why I'm telling you to do it in the planner, not the parser --- it is easy to assign globally-unique- across-the-plan numbers at plan time, in fact we do it already. > For debugging purposes, it seems like a good idea to invent a new kind > of Param for these, and keep them separate from PARAM_EXEC params. I'd vote against that too. PARAM_EXEC Params already have more than one purpose. regards, tom lane