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 33A865E46CE for ; Wed, 1 Sep 2004 04:22:30 -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 36250-07 for ; Wed, 1 Sep 2004 07:22:26 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 4C5685E46F9 for ; Wed, 1 Sep 2004 04:22:26 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id E83CE35511; Wed, 1 Sep 2004 00:22:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id E71A535469; Wed, 1 Sep 2004 00:22:26 -0700 (PDT) Date: Wed, 1 Sep 2004 00:22:26 -0700 (PDT) From: Stephan Szabo To: sad Cc: Michael Glaesemann , pgsql-sql@postgresql.org Subject: Re: casting BOOL to somthng In-Reply-To: <200409011027.11800.sad@bankir.ru> Message-ID: <20040901002131.P60523@megazone.bigpanda.com> References: <200408311306.25545.sad@bankir.ru> <200409010941.54539.sad@bankir.ru> <20040901001230.O60275@megazone.bigpanda.com> <200409011027.11800.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/11 X-Sequence-Number: 18857 On Wed, 1 Sep 2004, sad wrote: > > There's a difference between an output function and a cast to text. > > One gives you an external representation of the data for end use. The > > other gives you an internal representation for manipulation. > > And at the same time > > 't'::TEXT can be casted to BOOL > 't'::BOOL > > but reverse. select 't'::text::bool; ERROR: cannot cast type text to boolean If you're thinking 't'::bool, that's something different.