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

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #5028: CASE returns ELSE value always when type is "char"
Дата
Msg-id 4AA124F1020000250002AAE8@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: BUG #5028: CASE returns ELSE value always when type is "char"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I'm not certain what you're trying to say, but the above is complete
> nonsense ...

Ah, so it is.  I thought someone up-thread said that in this case it
wound up as bpchar; but I see that's not so:

test=# select pg_typeof((select case when true then 'xxx' else
'a'::char(1) end));
 pg_typeof
-----------
 character
(1 row)

All that's done is to strip off the length.

I guess that since the "char" type is documented as being for internal
use, these issues would only affect those who choose to write queries
against catalog tables or use an internal type in their tables, so I
guess it's not worth going to extremes to make it behave like char.

Given all that, I'll conceed the point, and give a +1 for the error
message.

-Kevin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: 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"