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

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5028: CASE returns ELSE value always when type is "char"
Date: 2009-09-04 19:37:07
Message-ID: 20090904193707.GF5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Rob Resendez 2009-09-04 22:02:44 BUG #5037: jdbc bug \uffff
Previous Message Kevin Grittner 2009-09-04 19:32:17 Re: BUG #5028: CASE returns ELSE value always when type is "char"