Re: BUG #17765: SELECT CAST(true AS BIGINT);

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17765: SELECT CAST(true AS BIGINT);
Дата
Msg-id 1076777.1675177225@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17765: SELECT CAST(true AS BIGINT);  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> ERROR: cannot cast type boolean to bigint

> That's inconsistent since casting boolean to int is OK (SELECT CAST(true AS
> INT);) or double casting is OK (SELECT CAST(CAST(true AS INT) AS BIGINT);).

We also don't offer direct casts from bool to smallint, numeric, float4,
or float8.  I'm disinclined to add any of those, although you certainly
can make them locally if you need them.

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17765: SELECT CAST(true AS BIGINT);
Следующее
От: Bowen Shi
Дата:
Сообщение: Re: BUG #17744: Fail Assert while recoverying from pg_basebackup