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