Re: [HACKERS] numeric & decimal - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] numeric & decimal
Date
Msg-id 37379DFB.F9AC9F06@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] numeric & decimal  (jwieck@debis.com (Jan Wieck))
List 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@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: web site addition
Next
From: Don Baccus
Date:
Subject: