Re: BUG #12273: CASE Expression BUG
От | Tom Lane |
---|---|
Тема | Re: BUG #12273: CASE Expression BUG |
Дата | |
Msg-id | 4028.1418937266@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #12273: CASE Expression BUG (David Johnston <david.g.johnston@gmail.com>) |
Список | pgsql-bugs |
David Johnston <david.g.johnston@gmail.com> writes: > On Thu, Dec 18, 2014 at 1:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> That's why that isn't the example ;-). In this case, since the WHEN is a >> constant, the constant-expression simplifier itself figures out that it >> can throw away the THEN expression and replace the whole CASE with the >> ELSE expression. So it doesn't bother const-simplifying the THEN, hence >> no error. > âIs the example with the "WITH" CTE too involved to use instead?â Doesn't seem like it really adds anything. >> Meh. The same principle applies in other languages too, so I don't think >> your wording is an improvement. > âYour's just didn't read that well to me...though the overall content was > good. Maybe drop "Thus" and just lead with "Within PL/pgSQL functions, for > example, using an IF [...]" OK. regards, tom lane
В списке pgsql-bugs по дате отправления: