Re: What do you think? - Mailing list pgsql-general

From Mike Mascari
Subject Re: What do you think?
Date
Msg-id 391317BF.18FCE479@mascari.com
Whole thread Raw
In response to What do you think?  (Terry Jarrard <jarrard@webzone.net>)
List 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

pgsql-general by date:

Previous
From: Alfred Perlstein
Date:
Subject: EXCEPT clause broken/slow in 6.5.3 ?
Next
From: "Donald Dade"
Date:
Subject: Re: ../\...Advice For New Immigrants^^^..