Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm3UK-0000jM-GQ for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2014 16:31:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xm3UJ-0005NT-Vg for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2014 16:31:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xm3UI-0005LF-OY for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 16:31:14 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xm3U7-0004sH-9u for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 16:31:12 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Xm3U6-0005WD-1A for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 08:31:02 -0800 Date: Wed, 5 Nov 2014 08:31:02 -0800 (PST) From: David G Johnston To: pgsql-bugs@postgresql.org Message-ID: <1415205062021-5825784.post@n5.nabble.com> In-Reply-To: <2537.1415200422@sss.pgh.pa.us> References: <545A3454.80701@travelaudience.com> <2537.1415200422@sss.pgh.pa.us> Subject: Re: BUG REPORT: Unable to cast boolean::smallint MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Tom Lane-2 wrote > James Pittman < > j.pittman@ > > writes: >> It does not seem possible to be able to cast a boolean to a smallint. > > 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? To the OP, why do you think you want one? While I haven't used it much converting Boolean to zero/one for use in a math formula is a known use case though likely one where the difference between int and smallint would probably be marginalized. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-REPORT-Unable-to-cast-boolean-smallint-tp5825768p5825784.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs