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 9EC33528E6 for ; Fri, 3 Jun 2005 12:37:59 -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 95389-05 for ; Fri, 3 Jun 2005 15:37:54 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 68A535288E for ; Fri, 3 Jun 2005 12:37:53 -0300 (ADT) Received: (qmail 13126 invoked by uid 500); 3 Jun 2005 15:36:59 -0000 Date: Fri, 3 Jun 2005 10:36:59 -0500 From: Bruno Wolff III To: Tom Lane Cc: Markus Bertheau ??? , Michael Glaesemann , PostgreSQL Subject: Re: 'true'::TEXT::BOOLEAN Message-ID: <20050603153659.GA12878@wolff.to> Mail-Followup-To: Bruno Wolff III , Tom Lane , Markus Bertheau ??? , Michael Glaesemann , PostgreSQL References: <1117799555.9816.24.camel@dicaprio.akademie1.de> <3DCEDE55-9D4A-4F4E-8907-ADCC058A3398@myrealbox.com> <1117801417.9816.28.camel@dicaprio.akademie1.de> <20050603151125.GA10971@wolff.to> <5276.1117812482@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5276.1117812482@sss.pgh.pa.us> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/55 X-Sequence-Number: 21656 On Fri, Jun 03, 2005 at 11:28:02 -0400, Tom Lane wrote: > > That won't actually work either, because boolin wants cstring: Thanks for pointing that out. I was actually surprised to see my test work, since I knew boolin expected cstring. I forgot that by not providing a type strings get treated specially. > There's been discussion of allowing all datatypes to be explicitly > casted to or from text by generating conversions like these > automatically. But I'm not sure if everyone's convinced it's a good > idea or not. You'd also have to argue about whether varchar should > be included in the special dispensation ... I don't remember ever running accross documentation on how to solve this problem. Even something noting that most of the type input and output functions are named typein and typeout and that to convert to text you can use textin(typeout(typevalue)) and to convert from text you can use typein(textout(text)) would probably be good enough.