Re: [HACKERS] case bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] case bug?
Дата
Msg-id 14729.937064068@sss.pgh.pa.us
обсуждение исходный текст
Ответ на case bug?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Following case statement is legal but fails in 6.5.1.
> select i,
>   case
>     when i < 0 then 'minus'
>     when i = 0 then 'zero'
>     when i > 0 then  'plus'
>     else null
>   end
> from t1;
> ERROR:  Unable to locate type oid 0 in catalog

Still there in current sources, too.  Looks like it's the "else null"
that triggers the problem --- probably the code that is resolving the
final output type of the CASE expression isn't coping with a null.

I think this is Lockhart's turf, but I can have a go at it if he hasn't
got time to work on it...
        regards, tom lane


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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] case bug?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] serial type