BUG REPORT: Unable to cast boolean::smallint

From: James Pittman <j(dot)pittman(at)travelaudience(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Norbert Buchmüller <n(dot)buchmueller(at)travelaudience(dot)com>
Subject: BUG REPORT: Unable to cast boolean::smallint
Date: 2014-11-05 14:29:40
Message-ID: 545A3454.80701@travelaudience.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message gauchard 2014-11-05 14:44:48 BUG #11882: make HAVE_WORKING_LINK an option
Previous Message Magnus Hagander 2014-11-05 12:59:25 Re: [BUGS] BUG #11872: row height is not quite tall eneough