Re: [HACKERS] numeric & decimal

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Jan Wieck <jwieck(at)debis(dot)com>
Cc: maillist(at)candle(dot)pha(dot)pa(dot)us, jose(at)sferacarta(dot)com, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] numeric & decimal
Date: 1999-05-11 03:03:23
Message-ID: 37379DFB.F9AC9F06@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > NUMERIC == NUMERIC(p), where p is implementation-defined.
> > NUMERIC(p) == NUMERIC(p,0)
> > "The following are implementation-defined:
> > o The default precision for NUMERIC and DECIMAL if there is no
> > declared precision
> The default for NUMERIC is NUMERIC(30,6). NUMERIC(n) is
> treated as NUMERIC(n,0). So it is exactly as Date says and
> since it is already released, nothing to get changed -
> period.

I may be misinterpreting Date's synopsis, but I believe that the
default decimal location should be zero, rather than 6. The
"precision" terminology is from SQL92, and refers to the total number
of digits, not the position of the decimal point (as one might
reasonably expect from the usual usage of the word).

Implementation flexibility is allowed in the default total number of
digits, not the default location of the decimal point.

Regards.

- Tom

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-05-11 03:22:06
Previous Message Bruce Momjian 1999-05-11 02:56:20 web site addition