Re: [HACKERS] Upgrades for 6.4.1 - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Upgrades for 6.4.1
Date
Msg-id m0zrAlg-000EBPC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] Upgrades for 6.4.1  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] Upgrades for 6.4.1  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
I wrote:

>     NUMERIC  and  DECIMAL  are identical, but should be different
>     from INTEGER (what they are in Postgres for now).
>
>     All databases share the definition
>
>         NUMERIC [(precision [, scale] )]
>
> [...]
>
>     I'll hack around a little on it to see  what's  possible  for
>     us.

    Easy - and the type coersion stuff helps alot!

    Up  to  now  (1.5  hours  hacking) I have a NUMERIC type that
    handles  '+'  completely,  including  overflow   checks   and
    rounding.

    Subtract  will be trivial, because the core funcitons already
    exist for the add. Multiply and divide will  take  some  time
    and then there are all the comparision operators, an operator
    class   and   all   the   type   conversion   (int<->numeric,
    float<->numeric ...).

    Another  tricky  part I expect when telling the parser that a
    literal NUMERIC must not be enclosed into single quotes.

    The only ugly thing is, that I needed to  put  the  precision
    AND  the  scale together into atttypmod (I limited both to 99
    for now and put them as prec<<8 |  scale  into).  So  pg_dump
    will need attention later.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: Clark Evans
Date:
Subject: Help with Documentation?
Next
From: Keith Parks
Date:
Subject: Re: [HACKERS] Fixed outfuncs