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

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: BUG #5028: CASE returns ELSE value always when type is "char"
Дата
Msg-id 20090904193707.GF5407@samason.me.uk
обсуждение исходный текст
Ответ на Re: BUG #5028: CASE returns ELSE value always when type is "char"  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список 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/

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #5028: CASE returns ELSE value always when type is "char"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: lost statistics; analyze needs to execute twice