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 F25A05E46F8 for ; Wed, 1 Sep 2004 02:13:49 -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 95989-07 for ; Wed, 1 Sep 2004 05:13:41 +0000 (GMT) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id D34325E46CC for ; Wed, 1 Sep 2004 02:13:40 -0300 (ADT) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id 2B5592B324; Wed, 1 Sep 2004 09:13:38 +0400 (MSD) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.72]) by rock.spider.ru (Postfix) with ESMTP id DE9282B321; Wed, 1 Sep 2004 09:13:36 +0400 (MSD) Content-Type: text/plain; charset="iso-8859-1" From: sad Organization: IT To: Geoffrey , pgsql-sql@postgresql.org Subject: Re: casting BOOL to somthng Date: Wed, 1 Sep 2004 08:22:37 +0400 User-Agent: KMail/1.4.3 References: <200408311306.25545.sad@bankir.ru> <200408311524.16036.sad@bankir.ru> <41346D6C.30804@3times25.net> In-Reply-To: <41346D6C.30804@3times25.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200409010822.37712.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/1 X-Sequence-Number: 18847 On Tuesday 31 August 2004 16:22, Geoffrey wrote: > sad wrote: > > you wrote: > >>you can use CREATE CAST to make your own cast from boolean to text. > > > > thnx it helps. > > > > and i am still desire to know _WHY_ there are no predefined cast for BO= OL > > ? and at the same time there are predefined casts for INT and FLOAT....= .. > > I'd like to understand in what context you would find this useful. > Don't take me wrong please. I'm by no means a db expert, but I can't > see a purpose for such a cast. Can you provide a reasonable example of > such usage? Yes i can.=20 look: CREATE TABLE t (a int, b text, c bool); SELECT 'the row is: a=3D'||a::TEXT||' b=3D'||b||' c=3D'||c::TEXT FROM t;