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

Sam Mason <sam@samason.me.uk>

From: Sam Mason <sam@samason.me.uk>
To: pgsql-bugs@postgresql.org
Date: 2009-09-04T19:37:07Z
Lists: pgsql-bugs
On Fri, Sep 04, 2009 at 02:01:07PM -0500, Kevin Grittner wrote:
> > "char" is no different other than, by default, it happens to look a
> > lot like any value of text type.
>  
> So much so that it has the same name as a text type (wrapped in
> quotes) and behaves a lot like one:

You're getting bitten by implicit casts.  Try creating a view of any
of your examples and seeing what the resulting types are, or in 8.4 an
EXPLAIN VERBOSE seems to show how it's typed the expression.

-- 
  Sam  http://samason.me.uk/