Received: from dilbert.nurseamerica.net (unknown [207.53.237.114]) by postgresql.org (Postfix) with ESMTP id 9CA70475B38 for ; Tue, 16 Jul 2002 13:37:06 -0400 (EDT) Received: from nurseamerica.net (airband-216-138-83-218.airband.net [216.138.83.218] (may be forged)) by dilbert.nurseamerica.net (8.11.6/8.11.6) with ESMTP id g6GHb6i14879 for ; Tue, 16 Jul 2002 12:37:06 -0500 Message-ID: <3D3459C0.20209@nurseamerica.net> Date: Tue, 16 Jul 2002 12:37:04 -0500 From: Kevin Brannen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: datatype matrix (was: Re: Sorry..) References: <7344.1026703661@sss.pgh.pa.us> <200207151401.38968.josh@agliodbs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200207/242 X-Sequence-Number: 8620 Josh Berkus wrote: > Christopher, > > >>In the bad old days when we couldn't distinguish explicit from implicit >>cast functions, I was wary of adding new cast pathways. Too many >>implicit casts and you have no type system at all. But in 7.3 there >>should be no reason to object to an explicit-only cast from numeric >>to text or vice versa. > > > I'd suggest making the explicit cast of numeric to text be the exact > equivalent of: > > SELECT btrim(to_char(numeric, '999,999,999,999.9999999999')) > or similar. > In this vain, is there someplace in the docs that has a type conversion table (matrix) that shows what datatype can be cast into what other datatype (both implicitly and explicitly)? I haven't seen one and it would be helpful for us newbies. Thanks! Kevin