Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE
От
David G. Johnston
Тема
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE
Дата
Msg-id
CAKFQuwZ2Rk4T+NWM6uLbooEmg9ADUPb9MqBvqFceK_c2+RyKBQ@mail.gmail.com
Ответ на
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE (Chris BSomething)
Список
Дерево обсуждения
BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE PG Bug reporting form <noreply@postgresql.org>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Andrew Dunstan <andrew@dunslane.net>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Francisco J. Ossandón <fco.j.ossandon@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Chris BSomething <xpusostomos@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Chris BSomething <xpusostomos@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Vik Fearing <vik@postgresfriends.org>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Chris BSomething <xpusostomos@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Chris BSomething <xpusostomos@gmail.com>
Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE Francisco J. Ossandón <fco.j.ossandon@gmail.com>
On Wed, Jan 22, 2025 at 3:00 AM Chris BSomething <xpusostomos@gmail.com> wrote:
In the 6 rules for type resolution, rule 5 says "select the first non-unknown input type as candidate, and consider if other non-unknown types can be implicitly converted." ... should there not be a new rule, something like considering if the unknown types can be converted, then notice that a long string can't be converted to a char, because it won't fit? And then fail with an interesting error?
Do you have an example demonstrating this new rule? I'm doubting this resolution logic goes into that much depth regarding the semantics of each type. It is implied that even if an implicit cast exists from type A to type B that actual values of type A may fail during the casting process to make them type B. That would be the interesting error you'd end up seeing - but from the type casting/input system, not the type resolution one.
David J.
В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Chris BSomething
Дата: