Re: What do you think?

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Jurgen Defurne <defurnj(at)glo(dot)be>
Cc: postgreSQL general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: What do you think?
Date: 2000-05-05 18:49:35
Message-ID: 391317BF.18FCE479@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jurgen Defurne wrote:
>
> I am using probably 6.5.2 on my server, and absolutely 6.5.3 on my laptop for
> development. From the documentation I know that there are numeric types,
> but these are all binary integer types, as supplied with C -> 2, 4 and 8 byte
> types.
>
> I do not find any reference to a numeric type which can be defined as having
> D digits and P precision, like this : NUMERIC(D, P).
> Example : NUMERIC(8, 4) is a number with this format 9999.9999, etc.
>
> Jurgen

sd=> select version();
version
-------------------------------------------------------------------
PostgreSQL 6.5.3 on i586-pc-linux-gnu, compiled by gcc
egcs-2.91.66
(1 row)

sd=> create table test (value numeric(40, 4));
CREATE

sd=> insert into test values
('100000000000000000000000000000000000.1234');
INSERT 1415932 1

sd=> select * from test;
value
-----------------------------------------
100000000000000000000000000000000000.1234
(1 row)

The documentation describes this in some detail:

http://www.postgresql.org/docs/postgres/datatype.htm#AEN946

Hope that helps,

Mike Mascari

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-05-05 19:10:00 Re: What do you think?
Previous Message Jurgen Defurne 2000-05-05 17:33:51 Re: What do you think?