From: Karel Zak <zakkr@zf.jcu.cz>
To: Kevin Brannen <kevinb@nurseamerica.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: datatype matrix (was: Re: Sorry..)
Date: Wed, 17 Jul 2002 10:27:48 +0200
Message-ID: <20020717102748.A11609@zf.jcu.cz> (raw)
In-Reply-To: <3D3459C0.20209@nurseamerica.net>
References: <GNELIHDDFBOCMGBFGEFOAECDCDAA.chriskl@familyhealth.com.au>
<7344.1026703661@sss.pgh.pa.us>
<200207151401.38968.josh@agliodbs.com>
<3D3459C0.20209@nurseamerica.net>
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 <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: zakkr@zf.jcu.cz, kevinb@nurseamerica.net
Subject: Re: datatype matrix (was: Re: Sorry..)
In-Reply-To: <20020717102748.A11609@zf.jcu.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox