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-02 19:07:48
Message-ID: 20090902190748.GY5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Sep 02, 2009 at 01:55:28PM -0500, Kevin Grittner wrote:
> So the behavior of the "char" type is anomalous in this regard? Other
> character-based types behave like varchar (which has the behavior I
> would expect here)? That is encouraging. Why isn't the behavior of
> "char" in this regard considered a bug to be fixed?

I think there are lots of implicit casts going on that muddy the water
with respect to what's going on at a type level. Things get promoted to
TEXT easily in PG.

I posted a patch in this thread:

http://archives.postgresql.org/message-id/20090902091654.GL5407@samason.me.uk

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Sam Mason 2009-09-02 19:08:19 Re: BUG #5028: CASE returns ELSE value always when type is"char"
Previous Message Kevin Grittner 2009-09-02 18:55:28 Re: BUG #5028: CASE returns ELSE value always when type is"char"