Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm3aW-00010j-Hr for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2014 16:37:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xm3aV-0004EA-5e for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2014 16:37:39 +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 1Xm3aM-0003xT-NP for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 16:37:31 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xm3aG-00050L-Cn for pgsql-bugs@postgresql.org; Wed, 05 Nov 2014 16:37:25 +0000 Received: by mail-wi0-f172.google.com with SMTP id bs8so12947316wib.11 for ; Wed, 05 Nov 2014 08:37:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MfLD16M80uk/xKuAED4DlnvXNOkcjaysXYgNpLN09Gc=; b=kWQ7OZQuhuUG/UPtTtqEgngsmlGABFkVbNT6Kc/K1eNv2++mo4iJcGmaeJpSHgOyP4 eR060++Gdez4viRVKHkHTu8et2k3vXM5qaUqZ3w051VYX/6BRpgB+xjUqTW9nfzBz+Ms J39fuatgrUBpDhKuEZRE+zCUYxpBBWw/VrR4tPdoXa9YzrB8LH+xuV7J+m17E8evYA8H stF+KH+yrXZEbVGWsMOZQ5E/BWwsOzt3XUxVLAcSZ0TNj+xO0MvFM15PkQ2xIpti+KVw FPwM3OQBoRwYrvnk+Znay9J9Fu2CJ0QgWGBhOHFkOVs5I6wRpBL29P5YJmyJlJJojJQN SNZw== X-Gm-Message-State: ALoCoQkb0RSOaBpp43+KzeYbal67Sxs+o4bk5T128oy/uzc6qEPLGuRytLwDtv8nU8j8DHIHdJc4 X-Received: by 10.180.99.163 with SMTP id er3mr7148263wib.18.1415205442340; Wed, 05 Nov 2014 08:37:22 -0800 (PST) Received: from Markos-MacBook-Pro.local ([46.246.117.202]) by mx.google.com with ESMTPSA id r2sm5122827wif.23.2014.11.05.08.37.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Nov 2014 08:37:21 -0800 (PST) Message-ID: <545A5240.1000600@joh.to> Date: Wed, 05 Nov 2014 17:37:20 +0100 From: Marko Tiikkaja User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: David G Johnston , pgsql-bugs@postgresql.org Subject: Re: BUG REPORT: Unable to cast boolean::smallint References: <545A3454.80701@travelaudience.com> <2537.1415200422@sss.pgh.pa.us> <1415205062021-5825784.post@n5.nabble.com> In-Reply-To: <1415205062021-5825784.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 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