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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
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-02 18:41:09
Message-ID: 14859.1251916869@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> And I'm not even sure how I'd explain the rules to someone.

text is preferred to "char" which is preferred to unknown.

This particular example would be less confusing if 'Hey'::"char"
threw an error, but that behavior is the result of an ancient
(bad?) decision in the input function of one legacy datatype.
It's not, IMNSHO, evidence of an overall failure of the type system
as a whole.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-09-02 18:49:55 Re: BUG #5028: CASE returns ELSE value always when type is"char"
Previous Message Sam Mason 2009-09-02 18:38:47 Re: BUG #5028: CASE returns ELSE value always when type is"char"