Re: BUG #5028: CASE returns ELSE value always when type is "char"

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-bugs(at)postgresql(dot)org>,"Sam Mason" <sam(at)samason(dot)me(dot)uk>
Subject: Re: BUG #5028: CASE returns ELSE value always when type is "char"
Date: 2009-09-01 18:49:11
Message-ID: 4A9D2657020000250002A7B4@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Joseph Shraibman <jks(at)selectacast(dot)net> writes:
>>>> So the type of what is in the ELSE clause determines the type of
>>>> the output?
>>>
>>> If all the other branches are unknown literals, yes.
>
>> What's the best place to look to get a handle on what the benefits
>> are of treating character string literals as being of unknown type?
>> (Other than the obvious backward compatibility issues.)
>
> I think the odds of changing that are not measurably different from
> zero.

I figured that; I'm just trying to understand what seems to me like an
odd wart on the type system. I figure I must be missing something
important, so I'd kinda like to find out what that is.

-Kevin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2009-09-01 20:52:22 pg_ctl infinite loop and memory leak
Previous Message Tom Lane 2009-09-01 18:42:42 Re: BUG #5028: CASE returns ELSE value always when type is "char"