Received: from ara.zf.jcu.cz (ara.zf.jcu.cz [160.217.161.4]) by postgresql.org (Postfix) with ESMTP id 388B8475CB5 for ; Wed, 17 Jul 2002 04:27:51 -0400 (EDT) Received: from ara.zf.jcu.cz (localhost [127.0.0.1]) by ara.zf.jcu.cz (8.12.1/8.12.1/Debian -5) with ESMTP id g6H8RmDh013725; Wed, 17 Jul 2002 10:27:48 +0200 Received: (from zakkr@localhost) by ara.zf.jcu.cz (8.12.1/8.12.1/Debian -5) id g6H8RmRI013724; Wed, 17 Jul 2002 10:27:48 +0200 Date: Wed, 17 Jul 2002 10:27:48 +0200 From: Karel Zak To: Kevin Brannen Cc: pgsql-sql@postgresql.org Subject: Re: datatype matrix (was: Re: Sorry..) Message-ID: <20020717102748.A11609@zf.jcu.cz> References: <7344.1026703661@sss.pgh.pa.us> <200207151401.38968.josh@agliodbs.com> <3D3459C0.20209@nurseamerica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3D3459C0.20209@nurseamerica.net>; from kevinb@nurseamerica.net on Tue, Jul 16, 2002 at 12:37:04PM -0500 X-Archive-Number: 200207/259 X-Sequence-Number: 8637 On Tue, Jul 16, 2002 at 12:37:04PM -0500, Kevin Brannen wrote: > 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. Note: the btrim() call is needless. You can use Fill-Mode: SELECT to_char(numeric, 'FM999,999,999,999.9999999999'); ^^^ It's in docs :-) Karel -- Karel Zak http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz