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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: BUG #5028: CASE returns ELSE value always when type is"char"
Дата
Msg-id 603c8f070909020936v78e2ae9cw332ff92f65000e3b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5028: CASE returns ELSE value always when type is"char"  (Sam Mason <sam@samason.me.uk>)
Ответы Re: BUG #5028: CASE returns ELSE value always when type is"char"  (Sam Mason <sam@samason.me.uk>)
Список pgsql-bugs
On Wed, Sep 2, 2009 at 11:55 AM, Sam Mason<sam@samason.me.uk> wrote:
> In fact it doesn't seem to want to play ball at all. =A0Even given the
> apparently unambiguous:
>
> =A0SELECT 1+add(1,2);
> or
> =A0SELECT 'hi'||add(1,2);
>
> It doesn't get anywhere. =A0No need for "text 'hi'" in the second one
> because || isn't defined for values of integer type.

Right.  This is exactly the sort of thing that languages with real
type inference have no problem handling.  Of course, ML for example
doesn't allow overloading precisely because (AIUI) it makes type
inference difficult.  It would be awesome if we could make this work
though.

...Robert

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: BUG #5028: CASE returns ELSE value always when type is"char"
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #5025: Aggregate function with subquery in 8.3 and 8.4.