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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Cc: pgsql-bugs@postgresql.org, "Sam Mason" <sam@samason.me.uk>
Date: 2009-09-02T18:41:09Z
Lists: pgsql-bugs
"Kevin Grittner" <Kevin.Grittner@wicourts.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