| From: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
|---|---|
| To: | Kevin Brannen <kevinb(at)nurseamerica(dot)net> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: datatype matrix (was: Re: Sorry..) |
| Date: | 2002-07-17 08:27:48 |
| Message-ID: | 20020717102748.A11609@zf.jcu.cz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2002-07-17 09:29:16 | Re: Indexing UNIONs |
| Previous Message | Dror Matalon | 2002-07-17 07:20:30 | Large objects and Meta Data |