Re: BUG #14363: CASE against a literal value produces correct against, same expression against a column null doesn't
От | David G. Johnston |
---|---|
Тема | Re: BUG #14363: CASE against a literal value produces correct against, same expression against a column null doesn't |
Дата | |
Msg-id | CAKFQuwYrUqOTdzaEQA_D5e=+5bbJAKCwb0cSjKQor3R46c=joA@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #14363: CASE against a literal value produces correct against, same expression against a column null doesn't (hcate3@gmail.com) |
Список | pgsql-bugs |
On Mon, Oct 10, 2016 at 11:56 AM, <hcate3@gmail.com> wrote: > The following bug has been logged on the website: > > Bug reference: 14363 > Logged by: Henry Cate > Email address: hcate3@gmail.com > PostgreSQL version: 9.5.2 > Operating system: x86_64-pc-linux-gnu > Description: > > > ybd_test=3D# select version(); > version > > ------------------------------------------------------------ > -------------------------------------------------------- > PostgreSQL 9.5.2 on x86_64-pc-linux-gnu, compiled by clang version > 3.8.0-2ubuntu3 (tags/RELEASE_380/final), 64-bit > =E2=80=8BSame result in 9.3.12 =E2=80=8BIt seems like "case" is too complex an expression to be embedded i= nto the <..."simple" form of CASE expression...> SELECT case ( case decimal_9_1 when decimal_18_1 then 0 when decimal_9_1 then 1 end ) when 1 then 2 when 0 then 3 end https://www.postgresql.org/docs/9.5/static/functions-conditional.html I suspect this is some kind of long-standing bug that hasn't been seen due to this being a unusual way to write a case expression - mainly since the embedded case evaluates correctly if it is done as a top-level expression. David J.
В списке pgsql-bugs по дате отправления: