Re: How to cast as numeric - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: How to cast as numeric
Date
Msg-id 20021106180406.GB14903@wolff.to
Whole thread Raw
In response to How to cast as numeric  (Savita <savita@india.hp.com>)
List pgsql-general
On Wed, Nov 06, 2002 at 18:21:08 +0530,
  Savita <savita@india.hp.com> wrote:
> Hi ,
>
> I would like to know how to cast as numeric.For examlple
>
> I can use cast as
>
> cast(to_number(substring(os_crm_exchange_call_id, 4), 999999999999)  as
> smallint)

::numeric

numeric has 2 option paramters that allow you to limit the precision
and specify a scale. The default is to not limit precision.

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Formatting psql output
Next
From: Andrew Sullivan
Date:
Subject: Re: Synchronising/mirroring databases