BUG REPORT: Unable to cast boolean::smallint - Mailing list pgsql-bugs

From James Pittman
Subject BUG REPORT: Unable to cast boolean::smallint
Date
Msg-id 545A3454.80701@travelaudience.com
Whole thread Raw
Responses Re: BUG REPORT: Unable to cast boolean::smallint  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
It does not seem possible to be able to cast a boolean to a smallint.

Whilst the following is possible:

SELECT true::int;

 int4
------
    1
(1 row)


The following is not (as of 9.4beta3)

SELECT true::smallint;
ERROR:  cannot cast type boolean to smallint


It would seem logically consistent that both cases would hold true


Apologies if this is more of a 'feature request' than a bug.





Kind regards,


James

pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [pgsql-www] BUG #11872: row height is not quite tall eneough
Next
From: James Pittman
Date:
Subject: BUG REPORT: GiST - default operator type for boolean