Re: What do you think?

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
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 19:10:00
Message-ID: 20000505141000.B5035@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 05, 2000 at 07:33:51PM +0200, Jurgen Defurne wrote:
> Ross J. Reedstrom wrote:
>
> >
> > Good news, Jurgen! NUMERIC has been in there since 6.5.0, (hmm, can't
> > find a release date. Should ask Bruce to put a timeline somewhere)
> > There're a few bug fixes/feature extensions for it in 7.0 (to be released
> > Monday), some things like indices, arrays, log() and casting to numeric,
> > but otherwise, I think it's been a pretty stable basic type since it's
> > release. What version of PostgreSQL are you basing your comments on? You
> > sound fairly positive, even if you're using an older version. It's gotten
> > better! One of the curses of Open Source is how fast it can develop:
> > 6.5 was a huge leap over 6.4, and 7.0 is at least as big a jump past 6.5.
> >
> > Ross
> > --
> > Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
> > NSBRI Research Scientist/Programmer
> > Computer and Information Technology Institute
> > Rice University, 6100 S. Main St., Houston, TX 77005
>
> 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
>
>

Jurgen - I'm not lying to you, there'd be no point. The second
curse of Open Source software is that documentation always lags
implementation. Just try it! Here's a transcript from a session with
6.5.0:

wallace$ psql
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.3]

type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: reedstrm

reedstrm=>create table test (n numeric(10,2), t text);
CREATE
reedstrm=> \d test
Table = test
+----------------------------------+----------------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------------+-------+
| n | numeric | 10.2 |
| t | text | var |
+----------------------------------+----------------------------------+-------+
reedstrm=> insert into test values (12345678.90,'some number');
INSERT 1030922 1
reedstrm=> insert into test values (12345678.90234,'some other number');
INSERT 1030923 1
reedstrm=> insert into test values (123456780.90234,'too big a number');
ERROR: overflow on numeric ABS(value) >= 10^8 for field with precision 10 scale 2
reedstrm=> select * from test;
n|t
-----------+-----------------
12345678.90|some number
12345678.90|some other number
(2 rows)

reedstrm=>

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alfred Perlstein 2000-05-05 19:12:25 EXCEPT clause broken/slow in 6.5.3 ?
Previous Message Mike Mascari 2000-05-05 18:49:35 Re: What do you think?