X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D56DA5E46F3 for ; Wed, 1 Sep 2004 03:32:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18727-05 for ; Wed, 1 Sep 2004 06:32:54 +0000 (GMT) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id EBC385E46EE for ; Wed, 1 Sep 2004 03:32:54 -0300 (ADT) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id E17B02B327; Wed, 1 Sep 2004 10:32:53 +0400 (MSD) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.72]) by rock.spider.ru (Postfix) with ESMTP id 343292B325; Wed, 1 Sep 2004 10:32:53 +0400 (MSD) Content-Type: text/plain; charset="iso-8859-1" From: sad Organization: IT To: Stephan Szabo Subject: Re: casting BOOL to somthng Date: Wed, 1 Sep 2004 09:41:54 +0400 User-Agent: KMail/1.4.3 Cc: Michael Glaesemann , pgsql-sql@postgresql.org References: <200408311306.25545.sad@bankir.ru> <200409010829.00893.sad@bankir.ru> <20040831222407.W57281@megazone.bigpanda.com> In-Reply-To: <20040831222407.W57281@megazone.bigpanda.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200409010941.54539.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/4 X-Sequence-Number: 18850 On Wednesday 01 September 2004 09:24, Stephan Szabo wrote: > On Wed, 1 Sep 2004, sad wrote: > > On Tuesday 31 August 2004 17:49, Michael Glaesemann wrote: > > > On Aug 31, 2004, at 8:24 PM, sad wrote: > > > > and i am still desire to know _WHY_ there are no predefined cast for > > > > BOOL ? > > > > and at the same time there are predefined casts for INT and > > > > FLOAT...... > > > > > > I think the main reason is what is the proper textual representation = of > > > BOOLEAN? True, PostgreSQL returns 't' as a representation for the > > > BOOLEAN value TRUE, but some people might want it to return 'TRUE' or > > > 'true' or other representations. Picking one is perhaps arbitrary. > > > > There are many (infinite number) of INT representations, > > "Picking one is perhaps arbitrary." But you poke one and using it. > > There's a fairly accepted convention for integer representations. > There's no such convention for boolean representations. then why do you print its value on a screen ?!