Re: Looking for a function

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Looking for a function
Date: 2002-02-17 19:47:58
Message-ID: 200202171947.g1HJlwR28953@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rich Shepard wrote:
> On Sun, 17 Feb 2002, Bruce Momjian wrote:
>
> > Yes, there is, but it is part of a data type, MONEY, that we will be
> > converting to numeric some day:
> >
> > test=> select cash_words(100::money);
> > cash_words
> > ------------------------------------
> > One hundred dollars and zero cents
> > (1 row)
>
> Bruce,
>
> And I thought that the money data type was deprecated because it was
> replaced my numeric.

You could just cast to Money and print that, though money/cash is an
int4 with cents in the first few bits.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Artsimovich 2002-02-17 21:44:59 referential integrity problem
Previous Message Bruce Momjian 2002-02-17 19:45:42 Re: Looking for a function