Re: BUG REPORT: Unable to cast boolean::smallint

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG REPORT: Unable to cast boolean::smallint
Date: 2014-11-05 16:37:20
Message-ID: 545A5240.1000600@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David Gauchard 2014-11-05 16:52:26 Re: BUG #11882: make HAVE_WORKING_LINK an option
Previous Message Andres Freund 2014-11-05 16:35:14 Re: BUG #11882: make HAVE_WORKING_LINK an option