pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marko Tiikkaja <marko@joh.to>
To: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG REPORT: Unable to cast boolean::smallint
Date: Wed, 05 Nov 2014 17:37:20 +0100
Message-ID: <545A5240.1000600@joh.to> (raw)
In-Reply-To: <1415205062021-5825784.post@n5.nabble.com>
References: <545A3454.80701@travelaudience.com>
	<2537.1415200422@sss.pgh.pa.us>
	<1415205062021-5825784.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 11/5/14 5:31 PM, David G Johnston wrote:
> Tom Lane-2 wrote
>> Well, there are also not direct casts provided from boolean to bigint,
>> numeric, real, or double precision ;-).  I'm not terribly excited about
>> this.
>
> So why is there one for Boolean to int?

That can be useful for e.g.  CHECK (bool1::int + bool2::int + bool3::int 
= 1).


.marko


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)

Message-ID: <545A5240.1000600@joh.to>
Permalink:  ../545A5240.1000600@joh.to/
Also on:    postgresql.org/message-id/545A5240.1000600@joh.to

 · 

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: marko@joh.to, david.g.johnston@gmail.com
  Subject: Re: BUG REPORT: Unable to cast boolean::smallint
  In-Reply-To: <545A5240.1000600@joh.to>
  References: <545A3454.80701@travelaudience.com> <2537.1415200422@sss.pgh.pa.us> <1415205062021-5825784.post@n5.nabble.com> <545A5240.1000600@joh.to>

* 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