pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Pittman <j.pittman@travelaudience.com>
To: pgsql-bugs@postgresql.org
Cc: Norbert Buchmüller <n.buchmueller@travelaudience.com>
Subject: BUG REPORT: Unable to cast boolean::smallint
Date: Wed, 05 Nov 2014 15:29:40 +0100
Message-ID: <545A3454.80701@travelaudience.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (4+ messages)  latest in thread

Message-ID: <545A3454.80701@travelaudience.com>
Permalink:  ../545A3454.80701@travelaudience.com/
Also on:    postgresql.org/message-id/545A3454.80701@travelaudience.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: j.pittman@travelaudience.com, n.buchmueller@travelaudience.com
  Subject: Re: BUG REPORT: Unable to cast boolean::smallint
  In-Reply-To: <545A3454.80701@travelaudience.com>
  References: <545A3454.80701@travelaudience.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox