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

From Marko Tiikkaja
Subject Re: BUG REPORT: Unable to cast boolean::smallint
Date
Msg-id 545A5240.1000600@joh.to
Whole thread Raw
In response to Re: BUG REPORT: Unable to cast boolean::smallint  (David G Johnston <david.g.johnston@gmail.com>)
List 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

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #11882: make HAVE_WORKING_LINK an option
Next
From: hunsakerbn@familysearch.org
Date:
Subject: BUG #11883: Year 1500 not treated as leap year when it was a leap year