Re: Nested CASE-WHEN scoping

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Nested CASE-WHEN scoping
Date: 2011-05-30 14:21:30
Message-ID: 23055.1306765290@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-05-30 14:28:17 Re: Getting a bug tracker for the Postgres project
Previous Message Kim Bisgaard 2011-05-30 13:56:08 Re: Getting a bug tracker for the Postgres project