Re: Inconsistent cast to "char"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistent cast to "char"
Дата
Msg-id 2216960.1638480683@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inconsistent cast to "char"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I wrote:
> To be clear, the change I'm thinking of would result in errors, not in
> silently applying the int4 cast.  As a quick-n-dirty test:

> regression=# update pg_type set typcategory = 'x' where typname = 'char';
> UPDATE 1
> regression=# select 1::int8::"char", 1::int4::"char", 1::int2::"char";
> ERROR:  cannot cast type bigint to "char"
> LINE 1: select 1::int8::"char", 1::int4::"char", 1::int2::"char";
>                       ^

It turns out that changing the typcategory does have some undesirable
side-effects, but I found another possible workaround.  Patch
posted at [1].

            regards, tom lane

[1] https://www.postgresql.org/message-id/2216388.1638480141%40sss.pgh.pa.us



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inconsistent cast to "char"
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17311: Google search results: Outdated docs at the top