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 3A5865E3632 for ; Wed, 1 Sep 2004 02:25:09 -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 97945-08 for ; Wed, 1 Sep 2004 05:25:00 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id F34365E4719 for ; Wed, 1 Sep 2004 02:25:00 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 2966935201; Tue, 31 Aug 2004 22:24:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 27E9E351BF; Tue, 31 Aug 2004 22:24:59 -0700 (PDT) Date: Tue, 31 Aug 2004 22:24:59 -0700 (PDT) From: Stephan Szabo To: sad Cc: Michael Glaesemann , pgsql-sql@postgresql.org Subject: Re: casting BOOL to somthng In-Reply-To: <200409010829.00893.sad@bankir.ru> Message-ID: <20040831222407.W57281@megazone.bigpanda.com> References: <200408311306.25545.sad@bankir.ru> <200408311524.16036.sad@bankir.ru> <8618C5BA-FB54-11D8-A2A0-000A95C88220@myrealbox.com> <200409010829.00893.sad@bankir.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/3 X-Sequence-Number: 18849 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.